diff options
author | Max Horn | 2004-12-25 19:03:13 +0000 |
---|---|---|
committer | Max Horn | 2004-12-25 19:03:13 +0000 |
commit | 2941d595bd18d9a64e33b20658e007709db9afda (patch) | |
tree | 87b50ab9a2af254dc9b06dab6f0c8b5a822e80df /common | |
parent | fec3df209601b812034fafed53ef74b7ee732512 (diff) | |
download | scummvm-rg350-2941d595bd18d9a64e33b20658e007709db9afda.tar.gz scummvm-rg350-2941d595bd18d9a64e33b20658e007709db9afda.tar.bz2 scummvm-rg350-2941d595bd18d9a64e33b20658e007709db9afda.zip |
Make loading the config file explicit
svn-id: r16317
Diffstat (limited to 'common')
-rw-r--r-- | common/config-manager.cpp | 9 | ||||
-rw-r--r-- | common/config-manager.h | 3 |
2 files changed, 9 insertions, 3 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 33bb1cdfef..5bf26fbe50 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -62,7 +62,12 @@ const String falseStr("false"); ConfigManager::ConfigManager() { + // Ensure the global domain(s) are setup. + _globalDomains.addKey(kApplicationDomain); +} + +void ConfigManager::loadDefaultConfigFile() { char configFile[MAXPATHLEN]; #if defined(UNIX) if(getenv("HOME") != NULL) @@ -80,10 +85,10 @@ ConfigManager::ConfigManager() { #endif #endif - switchFile(configFile); + loadConfigFile(configFile); } -void ConfigManager::switchFile(const String &filename) { +void ConfigManager::loadConfigFile(const String &filename) { _globalDomains.clear(); _gameDomains.clear(); _transientDomain.clear(); diff --git a/common/config-manager.h b/common/config-manager.h index 5b6c27d531..8f946e26b6 100644 --- a/common/config-manager.h +++ b/common/config-manager.h @@ -74,7 +74,8 @@ public: /** The transient (pseudo) domain. */ static const String kTransientDomain; - void switchFile(const String &filename); + void loadDefaultConfigFile(); + void loadConfigFile(const String &filename); bool hasKey(const String &key) const; bool hasKey(const String &key, const String &dom) const; |