aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics
diff options
context:
space:
mode:
Diffstat (limited to 'backends/graphics')
-rw-r--r--backends/graphics/graphics.h1
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp4
-rw-r--r--backends/graphics/opengl/opengl-graphics.h1
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp4
-rw-r--r--backends/graphics/sdl/sdl-graphics.h1
5 files changed, 11 insertions, 0 deletions
diff --git a/backends/graphics/graphics.h b/backends/graphics/graphics.h
index 0a123d2cb4..d2ce6534e1 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -45,6 +45,7 @@ public:
virtual const OSystem::GraphicsMode *getSupportedGraphicsModes() const = 0;
virtual int getDefaultGraphicsMode() const = 0;
virtual bool setGraphicsMode(int mode) = 0;
+ virtual void resetGraphicsScale() = 0;
virtual int getGraphicsMode() const = 0;
#ifdef USE_RGB_COLOR
virtual Graphics::PixelFormat getScreenFormat() const = 0;
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;
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 2d61cec185..a6cf5c54dd 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -248,6 +248,10 @@ int SdlGraphicsManager::getDefaultGraphicsMode() const {
return GFX_DOUBLESIZE;
}
+void SdlGraphicsManager::resetGraphicsScale() {
+ setGraphicsMode(s_gfxModeSwitchTable[_scalerType][0]);
+}
+
void SdlGraphicsManager::beginGFXTransaction() {
assert(_transactionMode == kTransactionNone);
diff --git a/backends/graphics/sdl/sdl-graphics.h b/backends/graphics/sdl/sdl-graphics.h
index 52c30f5e00..e2ad4b525d 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -86,6 +86,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 { return _screenFormat; }
virtual Common::List<Graphics::PixelFormat> getSupportedFormats() const;