Add -c/--config option to specific alternate configuration file. Sorry Max, but it's damn useful for coverdiscs :)
svn-id: r12758
This commit is contained in:
parent
a2039576fb
commit
9b97d851fe
4 changed files with 40 additions and 1 deletions
|
@ -86,6 +86,14 @@ ConfigManager::ConfigManager() {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
switchFile(configFile);
|
||||
}
|
||||
|
||||
void ConfigManager::switchFile(const String &filename) {
|
||||
_globalDomains.clear();
|
||||
_gameDomains.clear();
|
||||
_transientDomain.clear();
|
||||
|
||||
// Ensure the global domain(s) are setup.
|
||||
_globalDomains.addKey(kApplicationDomain);
|
||||
#ifdef _WIN32_WCE
|
||||
|
@ -94,8 +102,9 @@ ConfigManager::ConfigManager() {
|
|||
_globalDomains.addKey("smartfon-keys");
|
||||
#endif
|
||||
|
||||
_filename = configFile;
|
||||
_filename = filename;
|
||||
loadFile(_filename);
|
||||
printf("Switched to configuration %s\n", _filename.c_str());
|
||||
}
|
||||
|
||||
void ConfigManager::loadFile(const String &filename) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue