From 4259b5467a5c43b36bd7296b40c9d3d7823b321e Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Mon, 26 Jan 2004 04:00:52 +0000 Subject: [PATCH] fix keys getting stuck after windows dialogs --- stepmania/src/StepMania.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index 353df0f86a..b21b2ab39f 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -1259,16 +1259,13 @@ static void HandleSDLEvents() LOG->Trace("App %s focus (%i%i)", g_bHasFocus? "has":"doesn't have", i&SDL_APPINPUTFOCUS, i&SDL_APPACTIVE); + /* If we lose focus, we may lose input events, especially key releases. */ + INPUTFILTER->Reset(); + if(g_bHasFocus) BoostAppPri(); else - { RestoreAppPri(); - - /* If we lose focus, we may lose input events, especially key - * releases. */ - INPUTFILTER->Reset(); - } } } }