aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-23 16:40:41 +0000
committerJohannes Schickel2008-09-23 16:40:41 +0000
commit7166d43774e0f790415bdf52a95b2bc5c28f020b (patch)
tree45fe62bc3fab5472796b0103869b97a0af85a58a /base
parent5258c80eaec25ecdc9720cb5bc5ca444d7f7ee64 (diff)
downloadscummvm-rg350-7166d43774e0f790415bdf52a95b2bc5c28f020b.tar.gz
scummvm-rg350-7166d43774e0f790415bdf52a95b2bc5c28f020b.tar.bz2
scummvm-rg350-7166d43774e0f790415bdf52a95b2bc5c28f020b.zip
Fix for bug #2120780 "GUI: gui-theme command-line option ignored", '-f' and '-g' command line switch behavior.
svn-id: r34637
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 3e560aa605..d571363f4a 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -68,6 +68,17 @@ static bool launcherDialog(OSystem &system) {
system.setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen"));
system.endGFXTransaction();
+ // When starting up launcher for the first time, the user might have specified
+ // a --gui-theme option, to allow that option to be working, we need to initialize
+ // GUI here.
+ // FIXME: Find a nicer way to allow --gui-theme to be working
+ GUI::NewGui::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.
+ ConfMan.getDomain(Common::ConfigManager::kTransientDomain)->clear();
+
// Set initial window caption
system.setWindowCaption(gScummVMFullVersion);
@@ -275,15 +286,8 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
system.initBackend();
// Unless a game was specified, show the launcher dialog
- if (0 == ConfMan.getActiveDomain()) {
- // Discard any command line options. Those that affect the graphics
- // mode etc. already have should have been handled by the backend at
- // this point. 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 (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