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

sev at users.sourceforge.net sev at users.sourceforge.net
Sun Jan 28 02:01:37 CET 2007


Revision: 25240
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25240&view=rev
Author:   sev
Date:     2007-01-27 17:01:36 -0800 (Sat, 27 Jan 2007)

Log Message:
-----------
Fix regression which prevented to run games specified only in command line
and not in config file.

Modified Paths:
--------------
    scummvm/trunk/base/commandLine.cpp
    scummvm/trunk/base/game.cpp

Modified: scummvm/trunk/base/commandLine.cpp
===================================================================
--- scummvm/trunk/base/commandLine.cpp	2007-01-28 00:56:08 UTC (rev 25239)
+++ scummvm/trunk/base/commandLine.cpp	2007-01-28 01:01:36 UTC (rev 25240)
@@ -647,7 +647,8 @@
 	// domain (i.e. a target) matching this argument, or alternatively
 	// whether there is a gameid matching that name.
 	if (!command.empty()) {
-		if (ConfMan.hasGameDomain(command) || Base::findGame(command)["gameid"].size() > 0) {
+		GameDescriptor gd = Base::findGame(command);
+		if (ConfMan.hasGameDomain(command) || (gd.contains("gameid") && !gd.gameid().empty())) {
 			ConfMan.setActiveDomain(command);
 		} else {
 			usage("Unrecognized game target '%s'", command.c_str());

Modified: scummvm/trunk/base/game.cpp
===================================================================
--- scummvm/trunk/base/game.cpp	2007-01-28 00:56:08 UTC (rev 25239)
+++ scummvm/trunk/base/game.cpp	2007-01-28 01:01:36 UTC (rev 25240)
@@ -68,7 +68,7 @@
 	PluginList::const_iterator iter = plugins.begin();
 	for (iter = plugins.begin(); iter != plugins.end(); ++iter) {
 		result = (*iter)->findGame(gameName.c_str());
-		if (!result.gameid().empty()) {
+		if (result.contains("gameid") && !result["gameid"].empty()) {
 			if (plugin)
 				*plugin = *iter;
 			break;


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