From 48564efc8812aef644144cb368d65a8d14a4397f Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Fri, 4 Jul 2014 22:37:43 +0200 Subject: OPENGLSDL: Don't ignore events after user-initiated resizes. --- backends/graphics/openglsdl/openglsdl-graphics.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'backends/graphics/openglsdl') 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; } -- cgit v1.2.3