From f5f06ae44e629044f730f8442784b1353df2ed20 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 26 Jan 2026 20:04:15 -0600 Subject: [PATCH] Remove handling for Windows versions that are no longer supported --- app/backend/systemproperties.cpp | 5 ++- app/streaming/input/abstouch.cpp | 35 +++++++++---------- .../video/ffmpeg-renderers/d3d11va.cpp | 8 ----- .../video/ffmpeg-renderers/dxva2.cpp | 1 - .../video/ffmpeg-renderers/pacer/pacer.cpp | 7 +--- 5 files changed, 19 insertions(+), 37 deletions(-) diff --git a/app/backend/systemproperties.cpp b/app/backend/systemproperties.cpp index b85a0951..2b72fb87 100644 --- a/app/backend/systemproperties.cpp +++ b/app/backend/systemproperties.cpp @@ -57,9 +57,8 @@ SystemProperties::SystemProperties() { USHORT processArch, machineArch; - // Use IsWow64Process2 on TH2 and later, because it supports ARM64 - auto fnIsWow64Process2 = (decltype(IsWow64Process2)*)GetProcAddress(GetModuleHandleA("kernel32.dll"), "IsWow64Process2"); - if (fnIsWow64Process2 != nullptr && fnIsWow64Process2(GetCurrentProcess(), &processArch, &machineArch)) { + // Use IsWow64Process2() because it doesn't lie on ARM64 + if (IsWow64Process2(GetCurrentProcess(), &processArch, &machineArch)) { switch (machineArch) { case IMAGE_FILE_MACHINE_I386: nativeArch = "i386"; diff --git a/app/streaming/input/abstouch.cpp b/app/streaming/input/abstouch.cpp index 28b33a4c..0fe6dac6 100644 --- a/app/streaming/input/abstouch.cpp +++ b/app/streaming/input/abstouch.cpp @@ -37,26 +37,23 @@ void SdlInputHandler::disableTouchFeedback() #ifdef Q_OS_WIN32 if (info.subsystem == SDL_SYSWM_WINDOWS) { - auto fnSetWindowFeedbackSetting = (decltype(SetWindowFeedbackSetting)*)GetProcAddress(GetModuleHandleW(L"user32.dll"), "SetWindowFeedbackSetting"); - if (fnSetWindowFeedbackSetting) { - constexpr FEEDBACK_TYPE feedbackTypes[] = { - FEEDBACK_TOUCH_CONTACTVISUALIZATION, - FEEDBACK_PEN_BARRELVISUALIZATION, - FEEDBACK_PEN_TAP, - FEEDBACK_PEN_DOUBLETAP, - FEEDBACK_PEN_PRESSANDHOLD, - FEEDBACK_PEN_RIGHTTAP, - FEEDBACK_TOUCH_TAP, - FEEDBACK_TOUCH_DOUBLETAP, - FEEDBACK_TOUCH_PRESSANDHOLD, - FEEDBACK_TOUCH_RIGHTTAP, - FEEDBACK_GESTURE_PRESSANDTAP, - }; + constexpr FEEDBACK_TYPE feedbackTypes[] = { + FEEDBACK_TOUCH_CONTACTVISUALIZATION, + FEEDBACK_PEN_BARRELVISUALIZATION, + FEEDBACK_PEN_TAP, + FEEDBACK_PEN_DOUBLETAP, + FEEDBACK_PEN_PRESSANDHOLD, + FEEDBACK_PEN_RIGHTTAP, + FEEDBACK_TOUCH_TAP, + FEEDBACK_TOUCH_DOUBLETAP, + FEEDBACK_TOUCH_PRESSANDHOLD, + FEEDBACK_TOUCH_RIGHTTAP, + FEEDBACK_GESTURE_PRESSANDTAP, + }; - for (FEEDBACK_TYPE ft : feedbackTypes) { - BOOL val = FALSE; - fnSetWindowFeedbackSetting(info.info.win.window, ft, 0, sizeof(val), &val); - } + for (FEEDBACK_TYPE ft : feedbackTypes) { + BOOL val = FALSE; + SetWindowFeedbackSetting(info.info.win.window, ft, 0, sizeof(val), &val); } } #endif diff --git a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp index 796b43df..6c35c491 100644 --- a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp +++ b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp @@ -10,7 +10,6 @@ #include "streaming/session.h" #include -#include #include @@ -465,13 +464,6 @@ bool D3D11VARenderer::initialize(PDECODER_PARAMETERS params) "D3D11VA is disabled by environment variable"); return false; } - else if (!IsWindows10OrGreater()) { - // Use DXVA2 on anything older than Win10, so we don't have to handle a bunch - // of legacy Win7/Win8 codepaths in here. - SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, - "D3D11VA renderer is only supported on Windows 10 or later."); - return false; - } if (!SDL_DXGIGetOutputInfo(SDL_GetWindowDisplayIndex(params->window), &m_AdapterIndex, &outputIndex)) { diff --git a/app/streaming/video/ffmpeg-renderers/dxva2.cpp b/app/streaming/video/ffmpeg-renderers/dxva2.cpp index d9c36ba1..a874cf40 100644 --- a/app/streaming/video/ffmpeg-renderers/dxva2.cpp +++ b/app/streaming/video/ffmpeg-renderers/dxva2.cpp @@ -18,7 +18,6 @@ extern "C" { #define WIN32_LEAN_AND_MEAN #include -#include #include #include diff --git a/app/streaming/video/ffmpeg-renderers/pacer/pacer.cpp b/app/streaming/video/ffmpeg-renderers/pacer/pacer.cpp index e2e70f94..4cdcb707 100644 --- a/app/streaming/video/ffmpeg-renderers/pacer/pacer.cpp +++ b/app/streaming/video/ffmpeg-renderers/pacer/pacer.cpp @@ -4,7 +4,6 @@ #ifdef Q_OS_WIN32 #define WIN32_LEAN_AND_MEAN #include -#include #include "dxvsyncsource.h" #endif @@ -283,11 +282,7 @@ bool Pacer::initialize(SDL_Window* window, int maxVideoFps, bool enablePacing) switch (info.subsystem) { #ifdef Q_OS_WIN32 case SDL_SYSWM_WINDOWS: - // Don't use D3DKMTWaitForVerticalBlankEvent() on Windows 7, because - // it blocks during other concurrent DX operations (like actually rendering). - if (IsWindows8OrGreater()) { - m_VsyncSource = new DxVsyncSource(this); - } + m_VsyncSource = new DxVsyncSource(this); break; #endif