[Scummvm-cvs-logs] SF.net SVN: scummvm:[35826] scummvm/trunk/base/main.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Jan 11 13:22:29 CET 2009


Revision: 35826
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35826&view=rev
Author:   sev
Date:     2009-01-11 12:22:29 +0000 (Sun, 11 Jan 2009)

Log Message:
-----------
Simplify code.

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2009-01-11 12:15:51 UTC (rev 35825)
+++ scummvm/trunk/base/main.cpp	2009-01-11 12:22:29 UTC (rev 35826)
@@ -57,6 +57,11 @@
 
 static bool launcherDialog(OSystem &system) {
 
+	// Discard any command line options. Those that affect the graphics
+	// mode and the others (like bootparam etc.) should not
+	// blindly be passed to the first game launched from the launcher.
+	ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
+
 #if defined(_WIN32_WCE)
 	CELauncherDialog dlg;
 #elif defined(__DC__)
@@ -204,7 +209,7 @@
 	return result;
 }
 
-static void setupGraphics(OSystem &system, bool clearDomain = false) {
+static void setupGraphics(OSystem &system) {
 	
 	system.beginGFXTransaction();
 		// Set the user specified graphics mode (if any).
@@ -224,12 +229,6 @@
 	// FIXME: Find a nicer way to allow --gui-theme to be working
 	GUI::GuiManager::instance();
 
-	// Discard any command line options. Those that affect the graphics
-	// mode and the others (like bootparam etc.) should not
-	// blindly be passed to the first game launched from the launcher.
-	if (clearDomain)
-		ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
-
 	// Set initial window caption
 	system.setWindowCaption(gScummVMFullVersion);
 
@@ -300,11 +299,8 @@
 	system.getEventManager()->init();
 
 	// Unless a game was specified, show the launcher dialog
-	if (0 == ConfMan.getActiveDomain()) {
-		ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
-
+	if (0 == ConfMan.getActiveDomain())
 		launcherDialog(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
@@ -348,7 +344,7 @@
 		}
 		
 		// reset the graphics to default
-		setupGraphics(system, true);
+		setupGraphics(system);
 		launcherDialog(system);
 	}
 	PluginManager::instance().unloadPlugins();


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