sdl: fix a bug where alt key would get "stuck" when alt tabbing to fceux window

This commit is contained in:
punkrockguy318 2011-10-23 05:05:28 +00:00
parent 54fc74b0d8
commit c04111675a
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,4 @@
23-octo-2011 - prg319 - sdl: fix a bug where alt key would get "stuck" when alt tabbing to window
19-octo-2011 - prg318 - scons: "scons install" now installs auxlib and manpage
19-octo-2011 - prg318 - scons: added --prefix option to build system and improved "install" target
18-octo-2011 - prg318 - sdl: new hotkeys added - statestatenext savestateprev - useful for scrolling through savestates on a gamepad. mapped to pgup and pgdown by default

View File

@ -303,7 +303,7 @@ std::string GetUserText(const char* title)
g_config->getOption("SDL.Fullscreen", &fullscreen);
if(fullscreen)
ToggleFS(); // disable fullscreen emulation
/*
FILE *fpipe;
std::string command = "zenity --entry --title=\"";
command.append(title);
@ -416,7 +416,21 @@ KeyboardCommands()
#else
if(g_keyState[SDLK_LALT] || g_keyState[SDLK_RALT])
#endif
{
is_alt = 1;
#if !SDL_VERSION_ATLEAST(1, 3, 0)
// workaround for GDK->SDL in GTK problems where ALT release is never getting sent
// i know this is sort of an ugly hack to fix this, but the bug is rather annoying
// prg318 10/23/11
int fullscreen;
g_config->getOption("SDL.Fullscreen", &fullscreen);
if(!fullscreen)
{
g_keyState[SDLK_LALT] = 0;
g_keyState[SDLK_RALT] = 0;
}
#endif
}
else
is_alt = 0;