[Scummvm-cvs-logs] scummvm master -> 92e02457f59e30c0bedb9ae36cb02ba2e42e24bb

fuzzie fuzzie at fuzzie.org
Tue Jun 10 22:13:32 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
92e02457f5 OPENGLSDL: Always ignore bad resolution changes.


Commit: 92e02457f59e30c0bedb9ae36cb02ba2e42e24bb
    https://github.com/scummvm/scummvm/commit/92e02457f59e30c0bedb9ae36cb02ba2e42e24bb
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2014-06-10T22:07:11+02:00

Commit Message:
OPENGLSDL: Always ignore bad resolution changes.

Otherwise we can end up with the wrong resolution when we make
multiple resizes in quick succession.

Changed paths:
    backends/graphics/openglsdl/openglsdl-graphics.cpp



diff --git a/backends/graphics/openglsdl/openglsdl-graphics.cpp b/backends/graphics/openglsdl/openglsdl-graphics.cpp
index 9540a19..3f42d62 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;
 }
 






More information about the Scummvm-git-logs mailing list