aboutsummaryrefslogtreecommitdiff
path: root/base/commandLine.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-10-21 16:01:06 +0000
committerJohannes Schickel2008-10-21 16:01:06 +0000
commit649c18d5656cabab1a9e819098f58da5952e9cbf (patch)
treeb68c6e0e4827256f08d9d760a6d515b09fd110e9 /base/commandLine.cpp
parentcd38ddc542f6758ae7b06a8a10005d9af2546fd8 (diff)
downloadscummvm-rg350-649c18d5656cabab1a9e819098f58da5952e9cbf.tar.gz
scummvm-rg350-649c18d5656cabab1a9e819098f58da5952e9cbf.tar.bz2
scummvm-rg350-649c18d5656cabab1a9e819098f58da5952e9cbf.zip
Fix for bug #1960518 "ALL: --list-saves ignores custom paths".
svn-id: r34832
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r--base/commandLine.cpp8
1 files changed, 8 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);
}