aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp2
-rw-r--r--backends/graphics/opengl/opengl-graphics.h9
2 files changed, 10 insertions, 1 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp
index 468c40a970..915a686285 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -1219,6 +1219,8 @@ void OpenGLGraphicsManager::unloadGFXMode() {
}
void OpenGLGraphicsManager::setScale(int newScale) {
+ assert(_transactionMode == kTransactionActive);
+
if (newScale == _videoMode.scaleFactor)
return;
diff --git a/backends/graphics/opengl/opengl-graphics.h b/backends/graphics/opengl/opengl-graphics.h
index 3518d07fe7..976524e713 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -176,7 +176,14 @@ protected:
virtual bool loadGFXMode();
virtual void unloadGFXMode();
- virtual void setScale(int newScale);
+ /**
+ * Set the scale factor.
+ *
+ * This can only be used in a GFX transaction.
+ *
+ * @param newScale New scale factor.
+ */
+ void setScale(int newScale);
/**
* Query the scale factor.