diff options
author | Alejandro Marzini | 2010-07-30 03:06:57 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-30 03:06:57 +0000 |
commit | 9daa1c7f9359ca2467e9067b2f31021fdb7e0981 (patch) | |
tree | 2c1347da2845d81c85f4bb6b2aeb24ed92c83e25 /backends/graphics/opengl | |
parent | 37f7748a4abe9bf915871345797826641899ba49 (diff) | |
download | scummvm-rg350-9daa1c7f9359ca2467e9067b2f31021fdb7e0981.tar.gz scummvm-rg350-9daa1c7f9359ca2467e9067b2f31021fdb7e0981.tar.bz2 scummvm-rg350-9daa1c7f9359ca2467e9067b2f31021fdb7e0981.zip |
OSYSTEM: Add resetGraphicsScale() method.
This fixes a hack for resetting the graphics scale to x1 when starting games that have a large screen size. The SDL graphics manager should now scale back to x1 without changing the current scaler in use, as well as the OpenGL graphics manager.
svn-id: r51492
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 4 | ||||
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.h | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index 0526a791ee..11ac5f0fce 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -168,6 +168,10 @@ int OpenGLGraphicsManager::getGraphicsMode() const { return _videoMode.mode; } +void OpenGLGraphicsManager::resetGraphicsScale() { + setScale(1); +} + #ifdef USE_RGB_COLOR Graphics::PixelFormat OpenGLGraphicsManager::getScreenFormat() const { diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h index ee14df836e..88bcfe564b 100644 --- a/backends/graphics/opengl/opengl-graphics.h +++ b/backends/graphics/opengl/opengl-graphics.h @@ -59,6 +59,7 @@ public: virtual int getDefaultGraphicsMode() const; virtual bool setGraphicsMode(int mode); virtual int getGraphicsMode() const; + virtual void resetGraphicsScale(); #ifdef USE_RGB_COLOR virtual Graphics::PixelFormat getScreenFormat() const; virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const = 0; |