sdl: change the way that the Shift and Alt keys are detected

Fixes an issue that would occur after switching from SDL fullscreen to GTK+ windowed, where pressing Enter after releasing Alt in windowed mode would trigger a switch back to fullscreen.
This commit is contained in:
plombo 2011-03-30 02:56:44 +00:00
parent 3dbcd76aa9
commit 1b5b6ee38d
1 changed files with 2 additions and 2 deletions

View File

@ -402,11 +402,11 @@ KeyboardCommands()
}
mod = SDL_GetModState();
if(mod & (KMOD_LSHIFT|KMOD_RSHIFT))
if(g_keyState[SDLK_LSHIFT] || g_keyState[SDLK_RSHIFT])
is_shift = 1;
else
is_shift = 0;
if(mod & (KMOD_LALT| KMOD_RALT))
if(g_keyState[SDLK_LALT] || g_keyState[SDLK_RALT])
is_alt = 1;
else
is_alt = 0;