[Scummvm-cvs-logs] CVS: scummvm/base main.cpp,1.60.2.2,1.60.2.3

Max Horn fingolfin at users.sourceforge.net
Sat Jan 8 10:39:04 CET 2005


Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13292/base

Modified Files:
      Tag: branch-0-7-0
	main.cpp 
Log Message:
Fix bug #1097467 (COMI: cursor is invisible at "insert CD" message)

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
retrieving revision 1.60.2.2
retrieving revision 1.60.2.3
diff -u -d -r1.60.2.2 -r1.60.2.3
--- main.cpp	30 Dec 2004 13:14:03 -0000	1.60.2.2
+++ main.cpp	8 Jan 2005 18:37:25 -0000	1.60.2.3
@@ -184,20 +184,7 @@
 
 #endif
 
-static bool launcherDialog(GameDetector &detector, OSystem *system) {
-
-	system->beginGFXTransaction();
-		// Set the user specified graphics mode (if any).
-		system->setGraphicsMode(ConfMan.get("gfx_mode").c_str());
-	
-		// GUI is (currently) always running at 320x200
-		system->initSize(320, 200);
-	system->endGFXTransaction();
-
-	
-	// Clear the main screen
-	system->clearScreen();
-
+static void setupDummyPalette(OSystem &system) {
 	// FIXME - mouse cursors are currently always set via 8 bit data.
 	// Thus for now we need to setup a dummy palette. On the long run, we might
 	// want to add a setMouseCursor_overlay() method to OSystem, which would serve
@@ -223,7 +210,25 @@
 		255, 255, 255, 0, 
 	};
 
-	system->setPalette(dummy_palette, 0, 16);
+	system.setPalette(dummy_palette, 0, 16);
+}
+
+static bool launcherDialog(GameDetector &detector, OSystem *system) {
+
+	system->beginGFXTransaction();
+		// Set the user specified graphics mode (if any).
+		system->setGraphicsMode(ConfMan.get("gfx_mode").c_str());
+	
+		// GUI is (currently) always running at 320x200
+		system->initSize(320, 200);
+	system->endGFXTransaction();
+
+	
+	// Clear the main screen
+	system->clearScreen();
+
+	// Setup a dummy palette, for the mouse cursor
+	setupDummyPalette(*system);
 
 #if defined(_WIN32_WCE)
 	CELauncherDialog dlg(detector);
@@ -376,6 +381,10 @@
 	// Unless a game was specified, show the launcher dialog
 	if (detector._targetName.isEmpty())
 		running = launcherDialog(detector, system);
+	else
+		// Setup a dummy palette, for the mouse cursor, in case an error
+		// dialog has to be shown. See bug #1097467.
+		setupDummyPalette(*system);
 
 	// FIXME: We're now looping the launcher. This, of course, doesn't
 	// work as well as it should. In theory everything should be destroyed





More information about the Scummvm-git-logs mailing list