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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Dec 27 00:00:18 CET 2007


Revision: 30006
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30006&view=rev
Author:   fingolfin
Date:     2007-12-26 15:00:18 -0800 (Wed, 26 Dec 2007)

Log Message:
-----------
Do not use SDL_WM_ToggleFullScreen, it's buggy on too many systems. Should fix bug #1705410.

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

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2007-12-26 21:45:22 UTC (rev 30005)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2007-12-26 23:00:18 UTC (rev 30006)
@@ -704,24 +704,14 @@
 			return;
 		}
 
-#if (defined(MACOSX) && !SDL_VERSION_ATLEAST(1, 2, 6)) || defined(__MAEMO__)
-		// On OS X, SDL_WM_ToggleFullScreen is currently not implemented. Worse,
-		// before SDL 1.2.6 it always returned -1 (which would indicate a
-		// successful switch). So we simply don't call it at all and use
-		// hotswapGFXMode() directly to switch to fullscreen mode.
+		// Switch between fullscreen and windowed mode by invoking hotswapGFXMode().
+		// We used to use SDL_WM_ToggleFullScreen() in the past, but this caused various
+		// problems. E.g. on OS X, it was implemented incorrectly for a long time; on
+		// the MAEMO platform, it seems to have caused problems, too.
+		// And on Linux, there were some troubles, too (see bug #1705410).
+		// So, we just do it "manually" now. There shouldn't be any drawbacks to that
+		// anyway.
 		hotswapGFXMode();
-#else
-		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 Common::EVENT_SCREEN_CHANGED gets sent later
-			_modeChanged = true;
-		}
-#endif
 	}
 }
 


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