Skip to content

Commit

Permalink
engine: platform: sdl: clear key states on losing window focus
Browse files Browse the repository at this point in the history
  • Loading branch information
a1batross committed Jan 6, 2025
1 parent 4788a4e commit 274ea9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions engine/platform/sdl/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 274ea9d

Please sign in to comment.