diff options
author | Matthew Hoops | 2010-07-11 16:11:28 +0000 |
---|---|---|
committer | Matthew Hoops | 2010-07-11 16:11:28 +0000 |
commit | a1161feed2e2fcb10ef75d32bdad4df1054e159d (patch) | |
tree | 6c1eb3ada0e419ab2d69a5e3f010c12478aac9f7 /backends/graphics/sdl | |
parent | 4dca7c7e02a111a950124ee26a6d46090a0f755c (diff) | |
download | scummvm-rg350-a1161feed2e2fcb10ef75d32bdad4df1054e159d.tar.gz scummvm-rg350-a1161feed2e2fcb10ef75d32bdad4df1054e159d.tar.bz2 scummvm-rg350-a1161feed2e2fcb10ef75d32bdad4df1054e159d.zip |
Fix compile on Mac OS X.
svn-id: r50801
Diffstat (limited to 'backends/graphics/sdl')
-rw-r--r-- | backends/graphics/sdl/sdl-graphics.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp index 26a5a6302c..a554479756 100644 --- a/backends/graphics/sdl/sdl-graphics.cpp +++ b/backends/graphics/sdl/sdl-graphics.cpp @@ -1994,20 +1994,21 @@ bool SdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) { int newMode = -1; int factor = _videoMode.scaleFactor - 1; + SDLKey sdlKey = (SDLKey)key; // Increase/decrease the scale factor - if (key == SDLK_EQUALS || key == SDLK_PLUS || key == SDLK_MINUS || - key == SDLK_KP_PLUS || key == SDLK_KP_MINUS) { - factor += (key == SDLK_MINUS || key == SDLK_KP_MINUS) ? -1 : +1; + if (sdlKey == SDLK_EQUALS || sdlKey == SDLK_PLUS || sdlKey == SDLK_MINUS || + sdlKey == SDLK_KP_PLUS || sdlKey == SDLK_KP_MINUS) { + factor += (sdlKey == SDLK_MINUS || sdlKey == SDLK_KP_MINUS) ? -1 : +1; if (0 <= factor && factor <= 3) { newMode = s_gfxModeSwitchTable[_scalerType][factor]; } } - const bool isNormalNumber = (SDLK_1 <= key && key <= SDLK_9); - const bool isKeypadNumber = (SDLK_KP1 <= key && key <= SDLK_KP9); + const bool isNormalNumber = (SDLK_1 <= sdlKey && sdlKey <= SDLK_9); + const bool isKeypadNumber = (SDLK_KP1 <= sdlKey && sdlKey <= SDLK_KP9); if (isNormalNumber || isKeypadNumber) { - _scalerType = key - (isNormalNumber ? SDLK_1 : SDLK_KP1); + _scalerType = sdlKey - (isNormalNumber ? SDLK_1 : SDLK_KP1); if (_scalerType >= ARRAYSIZE(s_gfxModeSwitchTable)) return false; |