aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index c3584daa86..c998f3d1f1 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -356,10 +356,11 @@ bool OpenGLSdlGraphicsManager::setupMode(uint width, uint height) {
setActualScreenSize(_hwScreen->w, _hwScreen->h);
}
- // Ignore resize events (from SDL) for a few frames. This avoids
- // bad resizes to a (former) resolution for which we haven't
- // processed an event yet.
- _ignoreResizeEvents = 10;
+ // Ignore resize events (from SDL) for a few frames, if this isn't
+ // caused by a notification from SDL. This avoids bad resizes to a
+ // (former) resolution for which we haven't processed an event yet.
+ if (!_gotResize)
+ _ignoreResizeEvents = 10;
return _hwScreen != nullptr;
}