diff options
author | Jamieson Christian | 2003-06-11 18:34:37 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-06-11 18:34:37 +0000 |
commit | fdf69876ae458426c83ebbffa500b589590b255b (patch) | |
tree | e10cff70b013abb3997c830ba6ac9348d2d9d9e4 /common | |
parent | eb23eb1cd78e4a5bc2c81ae0cc631e0e7c613c08 (diff) | |
download | scummvm-rg350-fdf69876ae458426c83ebbffa500b589590b255b.tar.gz scummvm-rg350-fdf69876ae458426c83ebbffa500b589590b255b.tar.bz2 scummvm-rg350-fdf69876ae458426c83ebbffa500b589590b255b.zip |
Fixed command line options being ignored when the launcher is used.
Again, I hope I'm manipulating the domain-based config architecture
correctly. I've created yet another transient domain called
"_COMMAND_LINE", so that after game-specific options are loaded,
the command line options can be loaded and override the config
file. GUI options are then loaded so as to override command line
options.
svn-id: r8437
Diffstat (limited to 'common')
-rw-r--r-- | common/gameDetector.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 5192371591..ca943f6797 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -310,8 +310,9 @@ void GameDetector::parseCommandLine(int argc, char **argv) { char c; _save_slot = -1; - /* Parse the arguments */ - // FIXME: Add more lemons + // Parse the arguments + // into a transient "_COMMAND_LINE" config comain. + g_config->set_domain ("_COMMAND_LINE"); for (i = argc - 1; i >= 1; i--) { s = argv[i]; @@ -487,8 +488,14 @@ void GameDetector::setGame(const String &name) { g_config->rename_domain(name, "game-specific"); g_config->rename_domain("game-specific", name); updateconfig(); + + // The command line and launcher options + // override config file global and game-specific options. + g_config->set_domain ("_COMMAND_LINE"); + updateconfig(); g_config->set_domain ("user-overrides"); updateconfig(); + g_config->delete_domain ("_COMMAND_LINE"); g_config->delete_domain ("user-overrides"); } |