sdl: fix a bug where alt key would get "stuck" when alt tabbing to fceux window
This commit is contained in:
parent
54fc74b0d8
commit
c04111675a
|
@ -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: "scons install" now installs auxlib and manpage
|
||||||
19-octo-2011 - prg318 - scons: added --prefix option to build system and improved "install" target
|
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
|
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
|
||||||
|
|
|
@ -303,7 +303,7 @@ std::string GetUserText(const char* title)
|
||||||
g_config->getOption("SDL.Fullscreen", &fullscreen);
|
g_config->getOption("SDL.Fullscreen", &fullscreen);
|
||||||
if(fullscreen)
|
if(fullscreen)
|
||||||
ToggleFS(); // disable fullscreen emulation
|
ToggleFS(); // disable fullscreen emulation
|
||||||
/*
|
|
||||||
FILE *fpipe;
|
FILE *fpipe;
|
||||||
std::string command = "zenity --entry --title=\"";
|
std::string command = "zenity --entry --title=\"";
|
||||||
command.append(title);
|
command.append(title);
|
||||||
|
@ -416,7 +416,21 @@ KeyboardCommands()
|
||||||
#else
|
#else
|
||||||
if(g_keyState[SDLK_LALT] || g_keyState[SDLK_RALT])
|
if(g_keyState[SDLK_LALT] || g_keyState[SDLK_RALT])
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
is_alt = 1;
|
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
|
else
|
||||||
is_alt = 0;
|
is_alt = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue