From 68cb7f52c8dd64ccfe8f28e847b530c8835175c3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 15 Apr 2006 20:36:41 +0000 Subject: - Renamed ConfigManager::getActiveDomain to getActiveDomainName, and added a new getActiveDomain method that returns a pointer to the actual active *domain* - Added Engine::_targetName whose value is computed from the name of the active domain - Removed GameDetector::_targetName, instead code now uses either Engine::_targetName or the name of the active domain - This in turn allowed for removing usage of GameDetector in many places svn-id: r21916 --- common/config-manager.h | 4 +++- common/savefile.cpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/config-manager.h b/common/config-manager.h index 10313f64d5..d2336a289f 100644 --- a/common/config-manager.h +++ b/common/config-manager.h @@ -142,7 +142,9 @@ public: void flushToDisk(); void setActiveDomain(const String &domName); - const String & getActiveDomain() const { return _activeDomainName; } + Domain * getActiveDomain() { return _activeDomain; } + const Domain * getActiveDomain() const { return _activeDomain; } + const String & getActiveDomainName() const { return _activeDomainName; } // void addDomain(const String &domName); void removeGameDomain(const String &domName); diff --git a/common/savefile.cpp b/common/savefile.cpp index 1cdc29bfb3..5124ef8958 100644 --- a/common/savefile.cpp +++ b/common/savefile.cpp @@ -48,7 +48,7 @@ const char *SaveFileManager::getSavePath() const { // Work around a bug (#999122) in the original 0.6.1 release of // ScummVM, which would insert a bad savepath value into config files. if (0 == strcmp(dir, "None")) { - ConfMan.removeKey("savepath", ConfMan.getActiveDomain()); + ConfMan.removeKey("savepath", ConfMan.getActiveDomainName()); ConfMan.flushToDisk(); dir = ConfMan.get("savepath").c_str(); } -- cgit v1.2.3