diff options
author | Eugene Sandulenko | 2009-01-11 12:22:29 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2009-01-11 12:22:29 +0000 |
commit | 5cf930eedad8d90000238aeb9e6f6991abfc097b (patch) | |
tree | 145f651ad54be7832f06d1689631804cb141a58a | |
parent | 3172187aff555beeeca79ffd1e05885b55a9ffe1 (diff) | |
download | scummvm-rg350-5cf930eedad8d90000238aeb9e6f6991abfc097b.tar.gz scummvm-rg350-5cf930eedad8d90000238aeb9e6f6991abfc097b.tar.bz2 scummvm-rg350-5cf930eedad8d90000238aeb9e6f6991abfc097b.zip |
Simplify code.
svn-id: r35826
-rw-r--r-- | base/main.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/base/main.cpp b/base/main.cpp index e7d7b3c7aa..4acb558c10 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -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 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const 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 @@ static void setupGraphics(OSystem &system, bool clearDomain = false) { // 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 @@ extern "C" int scummvm_main(int argc, char *argv[]) { 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 @@ extern "C" int scummvm_main(int argc, char *argv[]) { } // reset the graphics to default - setupGraphics(system, true); + setupGraphics(system); launcherDialog(system); } PluginManager::instance().unloadPlugins(); |