[Scummvm-cvs-logs] SF.net SVN: scummvm:[34833] scummvm/branches/branch-0-12-0/base/commandLine .cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Oct 21 18:06:12 CEST 2008


Revision: 34833
          http://scummvm.svn.sourceforge.net/scummvm/?rev=34833&view=rev
Author:   lordhoto
Date:     2008-10-21 16:06:12 +0000 (Tue, 21 Oct 2008)

Log Message:
-----------
Partial backport of r34832 "Fix for bug #1960518 "ALL: --list-saves ignores custom paths".".

Modified Paths:
--------------
    scummvm/branches/branch-0-12-0/base/commandLine.cpp

Modified: scummvm/branches/branch-0-12-0/base/commandLine.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/base/commandLine.cpp	2008-10-21 16:01:06 UTC (rev 34832)
+++ scummvm/branches/branch-0-12-0/base/commandLine.cpp	2008-10-21 16:06:12 UTC (rev 34833)
@@ -609,6 +609,11 @@
 
 	// 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;
@@ -639,6 +644,9 @@
 		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);
 }
 
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list