diff options
author | Alyssa Milburn | 2014-06-10 22:01:38 +0200 |
---|---|---|
committer | Alyssa Milburn | 2014-06-10 22:07:11 +0200 |
commit | 92e02457f59e30c0bedb9ae36cb02ba2e42e24bb (patch) | |
tree | fe010baf705620b8db151a3fceb1eda328299e3a | |
parent | 8ca3316e3a19b875327fcf97c854445ec9b925d2 (diff) | |
download | scummvm-rg350-92e02457f59e30c0bedb9ae36cb02ba2e42e24bb.tar.gz scummvm-rg350-92e02457f59e30c0bedb9ae36cb02ba2e42e24bb.tar.bz2 scummvm-rg350-92e02457f59e30c0bedb9ae36cb02ba2e42e24bb.zip |
OPENGLSDL: Always ignore bad resolution changes.
Otherwise we can end up with the wrong resolution when we make
multiple resizes in quick succession.
-rw-r--r-- | backends/graphics/openglsdl/openglsdl-graphics.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp index 9540a19e9e..3f42d62a3a 100644 --- a/backends/graphics/openglsdl/openglsdl-graphics.cpp +++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp @@ -104,11 +104,6 @@ void OpenGLSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) case OSystem::kFeatureFullscreenMode: assert(getTransactionMode() != kTransactionNone); _wantsFullScreen = enable; - // When we switch to windowed mode we will ignore resize events. This - // avoids bad resizes to the (former) fullscreen resolution. - if (!enable) { - _ignoreResizeEvents = 10; - } break; case OSystem::kFeatureIconifyWindow: @@ -359,6 +354,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; + return _hwScreen != nullptr; } |