From 1b5b6ee38da2f6fc3d6bbcbf2a5d056bbda75b56 Mon Sep 17 00:00:00 2001 From: plombo Date: Wed, 30 Mar 2011 02:56:44 +0000 Subject: [PATCH] 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. --- src/drivers/sdl/input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index 10acc688..3cac1d51 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -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;