From 19f69dd5691c0f38813380e86aa8c848278e1d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Fri, 9 Aug 2024 17:56:03 -0300 Subject: [PATCH] don't change priority to idle if i_pauseinbackground is false --- src/common/platform/win32/i_input.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/common/platform/win32/i_input.cpp b/src/common/platform/win32/i_input.cpp index cb945d61e14..45a74fe0c11 100644 --- a/src/common/platform/win32/i_input.cpp +++ b/src/common/platform/win32/i_input.cpp @@ -124,6 +124,9 @@ int BlockMouseMove; static bool EventHandlerResultForNativeMouse; +EXTERN_CVAR(Bool, i_pauseinbackground); + + CVAR (Bool, k_allowfullscreentoggle, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) static void I_CheckGUICapture () @@ -481,8 +484,8 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_ACTIVATEAPP: - AppActive = wParam == TRUE; - if (wParam) + AppActive = (wParam == TRUE); + if (wParam || !i_pauseinbackground) { SetPriorityClass (GetCurrentProcess (), INGAME_PRIORITY_CLASS); }