[Scummvm-cvs-logs] SF.net SVN: scummvm:[34832] scummvm/trunk

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Tue Oct 21 18:01:07 CEST 2008


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

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

Modified Paths:
--------------
    scummvm/trunk/base/commandLine.cpp
    scummvm/trunk/gui/launcher.cpp

Modified: scummvm/trunk/base/commandLine.cpp
===================================================================
--- scummvm/trunk/base/commandLine.cpp	2008-10-21 11:42:08 UTC (rev 34831)
+++ scummvm/trunk/base/commandLine.cpp	2008-10-21 16:01:06 UTC (rev 34832)
@@ -567,6 +567,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;
 	if (domain)
@@ -596,6 +601,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);
 }
 
 

Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp	2008-10-21 11:42:08 UTC (rev 34831)
+++ scummvm/trunk/gui/launcher.cpp	2008-10-21 16:01:06 UTC (rev 34832)
@@ -552,6 +552,11 @@
 	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 @@
 	updateSaveList();
 
 	int ret = Dialog::runModal();
+
+	// Revert to the old active domain
+	ConfMan.setActiveDomain(oldDomain);
+
 	return ret;
 }
 


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