- skip rendering when application is not active

Use vid_activeinbackground CVAR to override this behavior
This commit is contained in:
alexey.lysiuk 2018-05-04 11:24:37 +03:00
commit 2be84dc636
11 changed files with 25 additions and 45 deletions

View file

@ -144,7 +144,7 @@ LPDIRECTINPUT8 g_pdi;
LPDIRECTINPUT g_pdi3;
BOOL AppActive = TRUE;
extern bool AppActive;
int SessionState = 0;
int BlockMouseMove;
@ -527,7 +527,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
break;
case WM_ACTIVATEAPP:
AppActive = wParam;
AppActive = wParam == TRUE;
if (wParam)
{
SetPriorityClass (GetCurrentProcess (), INGAME_PRIORITY_CLASS);