engine: platform: sdl: clear key states on losing window focus

This commit is contained in:
Alibek Omarov 2025-01-06 16:23:43 +03:00
parent 9d2a85f11f
commit 83b5edea88

View file

@ -396,8 +396,12 @@ static void SDLash_ActiveEvent( int gain )
}
#endif
host.status = HOST_NOFOCUS;
if( cls.key_dest == key_game )
{
Key_ClearStates();
IN_DeactivateMouse();
}
host.force_draw_version_time = host.realtime + 2.0;
VID_RestoreScreenResolution();