Make com_activeApp work on Linux

This commit is contained in:
Robert Beckebans 2025-01-23 14:33:34 +01:00
parent 57ee767d46
commit 4937ab142d

View file

@ -452,6 +452,7 @@ sysEvent_t Sys_GetEvent()
// DG: un-pause the game when focus is gained, that also re-grabs the input
// disabling the cursor is now done once in GLimp_Init() because it should always be disabled
cvarSystem->SetCVarBool( "com_pause", false );
cvarSystem->SetCVarBool( "com_activeApp", true );
// DG end
break;
}
@ -459,6 +460,7 @@ sysEvent_t Sys_GetEvent()
case SDL_WINDOWEVENT_FOCUS_LOST:
// DG: pause the game when focus is lost, that also un-grabs the input
cvarSystem->SetCVarBool( "com_pause", true );
cvarSystem->SetCVarBool( "com_activeApp", false );
// DG end
break;
@ -699,6 +701,9 @@ sysEvent_t Sys_GetEvent()
case SDL_JOYBUTTONUP:
case SDL_JOYDEVICEADDED:
case SDL_JOYDEVICEREMOVED:
case SDL_CONTROLLERDEVICEADDED:
case SDL_CONTROLLERDEVICEREMOVED:
// Avoid 'unknown event' spam
continue;
@ -756,7 +761,10 @@ sysEvent_t Sys_GetEvent()
}
continue; // just handle next event
// Avoid 'unknown event' spam
case SDL_TEXTEDITING:
case SDL_KEYMAPCHANGED:
case SDL_CLIPBOARDUPDATE:
continue; // just handle next event
default: