[Scummvm-cvs-logs] CVS: scummvm/backends/sdl graphics.cpp,1.21,1.22

Max Horn fingolfin at users.sourceforge.net
Mon Dec 6 13:14:00 CET 2004


Update of /cvsroot/scummvm/scummvm/backends/sdl
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25497

Modified Files:
	graphics.cpp 
Log Message:
Fix for bug #1074931 (GUI: Starting games in fullscreen doesn't work), avoid one unneccessary redraw

Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/sdl/graphics.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- graphics.cpp	3 Dec 2004 23:23:06 -0000	1.21
+++ graphics.cpp	6 Dec 2004 21:12:52 -0000	1.22
@@ -560,9 +560,9 @@
 	if (_fullscreen != enable) {
 		assert(_hwscreen != 0);
 		_fullscreen ^= true;
-
+		
 		undrawMouse();
-	
+
 #if defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)
 		// On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse,
 		// before SDL 1.2.6 it always returned -1 (which would indicate a
@@ -573,14 +573,14 @@
 		if (!SDL_WM_ToggleFullScreen(_hwscreen)) {
 			// if ToggleFullScreen fails, achieve the same effect with hotswap gfx mode
 			hotswapGFXMode();
+		} else {
+			// Blit everything to the screen
+			internUpdateScreen();
+			
+			// Make sure that an EVENT_SCREEN_CHANGED gets sent later
+			_modeChanged = true;
 		}
 #endif
-			
-		// Blit everything to the screen
-		internUpdateScreen();
-		
-		// Make sure that an EVENT_SCREEN_CHANGED gets sent later
-		_modeChanged = true;
 	}
 }
 
@@ -1147,7 +1147,7 @@
 }
 
 void OSystem_SDL::undrawMouse() {
-	assert (_transactionMode == kTransactionNone);
+	assert (_transactionMode == kTransactionNone || _transactionMode == kTransactionCommit);
 
 	if (!_mouseDrawn)
 		return;





More information about the Scummvm-git-logs mailing list