diff options
author | Alejandro Marzini | 2010-07-26 04:40:00 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-26 04:40:00 +0000 |
commit | 37cdff92773972ad52d643ece709c6e5c0823c29 (patch) | |
tree | 051d073df21b3fdc7132dc72e76a2739edd83f16 /backends/graphics | |
parent | 19ce960868956352139a0b43c7e43a63c5924525 (diff) | |
download | scummvm-rg350-37cdff92773972ad52d643ece709c6e5c0823c29.tar.gz scummvm-rg350-37cdff92773972ad52d643ece709c6e5c0823c29.tar.bz2 scummvm-rg350-37cdff92773972ad52d643ece709c6e5c0823c29.zip |
OPENGL: Do not allow changing to a not supported scale while on fullscreen.
svn-id: r51292
Diffstat (limited to 'backends/graphics')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 10 | ||||
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index f9b39ee524..e37cb8626d 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -931,8 +931,16 @@ void OpenGLGraphicsManager::setScale(int newScale) { if (newScale == _videoMode.scaleFactor) return; - _videoMode.scaleFactor = newScale; + switch (newScale) { + case OpenGL::GFX_NORMAL: + _videoMode.mode = OpenGL::GFX_NORMAL; + case OpenGL::GFX_DOUBLESIZE: + _videoMode.mode = OpenGL::GFX_DOUBLESIZE; + case OpenGL::GFX_TRIPLESIZE: + _videoMode.mode = OpenGL::GFX_TRIPLESIZE; + } + _videoMode.scaleFactor = newScale; _transactionDetails.sizeChanged = true; } diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 6f2ba0df9c..95c9b772c7 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -183,6 +183,8 @@ bool OpenGLSdlGraphicsManager::loadGFXMode() { _videoMode.hardwareWidth = bestMode->w; _videoMode.hardwareHeight = bestMode->h; } else { + if (_oldVideoMode.fullscreen) + return false; _videoMode.fullscreen = false; } } |