[Scummvm-cvs-logs] SF.net SVN: scummvm:[35685] scummvm/trunk/backends/platform/sdl

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Fri Jan 2 22:52:32 CET 2009


Revision: 35685
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35685&view=rev
Author:   lordhoto
Date:     2009-01-02 21:52:32 +0000 (Fri, 02 Jan 2009)

Log Message:
-----------
Fixed the way how screen changes are tracked. This should fix a crash when doing an RTL from COMI when a 3x scaler is enabled.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/events.cpp
    scummvm/trunk/backends/platform/sdl/graphics.cpp

Modified: scummvm/trunk/backends/platform/sdl/events.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/events.cpp	2009-01-02 21:24:13 UTC (rev 35684)
+++ scummvm/trunk/backends/platform/sdl/events.cpp	2009-01-02 21:52:32 UTC (rev 35685)
@@ -183,7 +183,6 @@
 	if (_modeChanged) {
 		_modeChanged = false;
 		event.type = Common::EVENT_SCREEN_CHANGED;
-		_screenChangeCount++;
 		return true;
 	}
 

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2009-01-02 21:24:13 UTC (rev 35684)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2009-01-02 21:52:32 UTC (rev 35685)
@@ -155,6 +155,12 @@
 
 			_videoMode.setup = true;
 			_modeChanged = true;
+			// OSystem_SDL::pollEvent used to update the screen change count,
+			// but actually it gives problems when a video mode was changed
+			// but OSystem_SDL::pollEvent was not called. This for example
+			// caused a crash under certain circumstances when doing an RTL.
+			// To fix this issue we update the screen change count right here.
+			_screenChangeCount++;
 		}
 	} else if (_transactionDetails.needHotswap) {
 		setGraphicsModeIntern();
@@ -166,6 +172,12 @@
 		} else {
 			_videoMode.setup = true;
 			_modeChanged = true;
+			// OSystem_SDL::pollEvent used to update the screen change count,
+			// but actually it gives problems when a video mode was changed
+			// but OSystem_SDL::pollEvent was not called. This for example
+			// caused a crash under certain circumstances when doing an RTL.
+			// To fix this issue we update the screen change count right here.
+			_screenChangeCount++;
 
 			if (_transactionDetails.needUpdatescreen)
 				internUpdateScreen();


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list