diff options
-rw-r--r-- | backends/platform/sdl/events.cpp | 5 | ||||
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 11 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index 4b36de8df0..5905d5f7ee 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -297,9 +297,8 @@ bool OSystem_SDL::handleKeyDown(SDL_Event &ev, Common::Event &event) { // Ctrl-Alt-<key> will change the GFX mode if ((b & (Common::KBD_CTRL|Common::KBD_ALT)) == (Common::KBD_CTRL|Common::KBD_ALT)) { - - handleScalerHotkeys(ev.key); - return false; + if (handleScalerHotkeys(ev.key)) + return false; } if (remapKey(ev, event)) diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index 077a9d519c..4a9c88419a 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -1910,7 +1910,7 @@ void OSystem_SDL::displayMessageOnOSD(const char *msg) { #pragma mark --- Misc --- #pragma mark - -void OSystem_SDL::handleScalerHotkeys(const SDL_KeyboardEvent &key) { +bool OSystem_SDL::handleScalerHotkeys(const SDL_KeyboardEvent &key) { // Ctrl-Alt-a toggles aspect ratio correction if (key.keysym.sym == 'a') { beginGFXTransaction(); @@ -1931,7 +1931,7 @@ void OSystem_SDL::handleScalerHotkeys(const SDL_KeyboardEvent &key) { displayMessageOnOSD(buffer); #endif internUpdateScreen(); - return; + return true; } int newMode = -1; @@ -1951,7 +1951,7 @@ void OSystem_SDL::handleScalerHotkeys(const SDL_KeyboardEvent &key) { if (isNormalNumber || isKeypadNumber) { _scalerType = key.keysym.sym - (isNormalNumber ? SDLK_1 : SDLK_KP1); if (_scalerType >= ARRAYSIZE(s_gfxModeSwitchTable)) - return; + return false; while (s_gfxModeSwitchTable[_scalerType][factor] < 0) { assert(factor > 0); @@ -1987,6 +1987,9 @@ void OSystem_SDL::handleScalerHotkeys(const SDL_KeyboardEvent &key) { } #endif internUpdateScreen(); - } + return true; + } else { + return false; + } } diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 6163d21105..a38d76583f 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -492,7 +492,7 @@ protected: virtual bool remapKey(SDL_Event &ev, Common::Event &event); - void handleScalerHotkeys(const SDL_KeyboardEvent &key); + bool handleScalerHotkeys(const SDL_KeyboardEvent &key); }; #endif |