don't change priority to idle if i_pauseinbackground is false

This commit is contained in:
Ricardo Luís Vaz Silva 2024-08-09 17:56:03 -03:00
parent 1655f7e3b7
commit b044baf850

View file

@ -124,6 +124,9 @@ int BlockMouseMove;
static bool EventHandlerResultForNativeMouse; static bool EventHandlerResultForNativeMouse;
EXTERN_CVAR(Bool, i_pauseinbackground);
CVAR (Bool, k_allowfullscreentoggle, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (Bool, k_allowfullscreentoggle, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
static void I_CheckGUICapture () static void I_CheckGUICapture ()
@ -481,8 +484,8 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break; break;
case WM_ACTIVATEAPP: case WM_ACTIVATEAPP:
AppActive = wParam == TRUE; AppActive = (wParam == TRUE);
if (wParam) if (wParam || !i_pauseinbackground)
{ {
SetPriorityClass (GetCurrentProcess (), INGAME_PRIORITY_CLASS); SetPriorityClass (GetCurrentProcess (), INGAME_PRIORITY_CLASS);
} }