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:
parent
3dbcd76aa9
commit
1b5b6ee38d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue