aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/commandLine.cpp8
-rw-r--r--gui/launcher.cpp9
2 files changed, 17 insertions, 0 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 7c4de7b0cc..415e57d8d6 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -567,6 +567,11 @@ static void listSaves(const char *target) {
// Grab the "target" domain, if any
const Common::ConfigManager::Domain *domain = ConfMan.getDomain(target);
+ // Set up the game domain as newly active domain, so
+ // target specific savepath will be checked
+ Common::String oldDomain = ConfMan.getActiveDomainName();
+ ConfMan.setActiveDomain(target);
+
// Grab the gameid from the domain resp. use the target as gameid
Common::String gameid;
if (domain)
@@ -596,6 +601,9 @@ static void listSaves(const char *target) {
printf(" %-4s %s\n", x->save_slot().c_str(), x->description().c_str());
// TODO: Could also iterate over the full hashmap, printing all key-value pairs
}
+
+ // Revert to the old active domain
+ ConfMan.setActiveDomain(oldDomain);
}
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 08206c9aab..2020694f79 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -552,6 +552,11 @@ int SaveLoadChooser::runModal(const EnginePlugin *plugin, const String &target)
if (_gfxWidget)
_gfxWidget->setGfx(0);
+ // Set up the game domain as newly active domain, so
+ // target specific savepath will be checked
+ String oldDomain = ConfMan.getActiveDomainName();
+ ConfMan.setActiveDomain(target);
+
_plugin = plugin;
_target = target;
_delSupport = (*_plugin)->hasFeature(MetaEngine::kSupportsDeleteSave);
@@ -563,6 +568,10 @@ int SaveLoadChooser::runModal(const EnginePlugin *plugin, const String &target)
updateSaveList();
int ret = Dialog::runModal();
+
+ // Revert to the old active domain
+ ConfMan.setActiveDomain(oldDomain);
+
return ret;
}