diff --git a/changelog.txt b/changelog.txt index 729804e2..54ee20d7 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 diff --git a/src/drivers/sdl/input.cpp b/src/drivers/sdl/input.cpp index cfe44b1e..df6ea40d 100644 --- a/src/drivers/sdl/input.cpp +++ b/src/drivers/sdl/input.cpp @@ -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;