diff options
author | Alejandro Marzini | 2010-07-22 15:36:50 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-22 15:36:50 +0000 |
commit | ef880dd5daa205aefd425dae5dcf32e94d1f6723 (patch) | |
tree | 7480b67f3e88c63970b9b2dd2dba0c00f835a205 /backends/graphics/openglsdl | |
parent | 0c2d90f090ab439d3b53ca6aaab5027d527716ba (diff) | |
download | scummvm-rg350-ef880dd5daa205aefd425dae5dcf32e94d1f6723.tar.gz scummvm-rg350-ef880dd5daa205aefd425dae5dcf32e94d1f6723.tar.bz2 scummvm-rg350-ef880dd5daa205aefd425dae5dcf32e94d1f6723.zip |
OPENGL: Add antialiasing, hotkey: ctrl+alt+f. Fixed minor bugs.
svn-id: r51146
Diffstat (limited to 'backends/graphics/openglsdl')
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index fe3662a520..4b77cf6f17 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -165,7 +165,7 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() { } } - if (_oldVideoMode.fullscreen != _videoMode.fullscreen) + if (_oldVideoMode.fullscreen || _videoMode.fullscreen) _transactionDetails.newContext = true; _hwscreen = SDL_SetVideoMode(_videoMode.hardwareWidth, _videoMode.hardwareHeight, 32, @@ -224,6 +224,15 @@ bool OpenGLSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) { return true; }*/ + // Ctrl-Alt-f toggles antialiasing + if (key == 'f') { + beginGFXTransaction(); + _videoMode.antialiasing = !_videoMode.antialiasing; + _transactionDetails.filterChanged = true; + endGFXTransaction(); + return true; + } + SDLKey sdlKey = (SDLKey)key; // Increase/decrease the scale factor @@ -235,7 +244,8 @@ bool OpenGLSdlGraphicsManager::handleScalerHotkeys(Common::KeyCode key) { beginGFXTransaction(); setScale(factor); endGFXTransaction(); - } + return true; + } } return false; } @@ -255,7 +265,7 @@ bool OpenGLSdlGraphicsManager::isScalerHotkey(const Common::Event &event) { const bool isScaleKey = (event.kbd.keycode == Common::KEYCODE_EQUALS || event.kbd.keycode == Common::KEYCODE_PLUS || event.kbd.keycode == Common::KEYCODE_MINUS || event.kbd.keycode == Common::KEYCODE_KP_PLUS || event.kbd.keycode == Common::KEYCODE_KP_MINUS); - return (isScaleKey || event.kbd.keycode == 'a'); + return (isScaleKey || event.kbd.keycode == 'a' || event.kbd.keycode == 'f'); } return false; } |