[Scummvm-cvs-logs] SF.net SVN: scummvm: [25242] scummvm/trunk/base
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Jan 28 11:29:24 CET 2007
Revision: 25242
http://scummvm.svn.sourceforge.net/scummvm/?rev=25242&view=rev
Author: fingolfin
Date: 2007-01-28 02:29:22 -0800 (Sun, 28 Jan 2007)
Log Message:
-----------
Always set gameid & description in a GameDescriptor (somewhat more future proof fix for the recent regression caused by the changes to gameid() / description() )
Modified Paths:
--------------
scummvm/trunk/base/commandLine.cpp
scummvm/trunk/base/game.cpp
scummvm/trunk/base/game.h
Modified: scummvm/trunk/base/commandLine.cpp
===================================================================
--- scummvm/trunk/base/commandLine.cpp 2007-01-28 07:31:26 UTC (rev 25241)
+++ scummvm/trunk/base/commandLine.cpp 2007-01-28 10:29:22 UTC (rev 25242)
@@ -648,7 +648,7 @@
// whether there is a gameid matching that name.
if (!command.empty()) {
GameDescriptor gd = Base::findGame(command);
- if (ConfMan.hasGameDomain(command) || (gd.contains("gameid") && !gd.gameid().empty())) {
+ if (ConfMan.hasGameDomain(command) || !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 07:31:26 UTC (rev 25241)
+++ scummvm/trunk/base/game.cpp 2007-01-28 10:29:22 UTC (rev 25242)
@@ -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.contains("gameid") && !result["gameid"].empty()) {
+ if (!result.gameid().empty()) {
if (plugin)
*plugin = *iter;
break;
Modified: scummvm/trunk/base/game.h
===================================================================
--- scummvm/trunk/base/game.h 2007-01-28 07:31:26 UTC (rev 25241)
+++ scummvm/trunk/base/game.h 2007-01-28 10:29:22 UTC (rev 25242)
@@ -36,7 +36,10 @@
class GameDescriptor : public Common::StringMap {
public:
- GameDescriptor() {}
+ GameDescriptor() {
+ setVal("gameid", "");
+ setVal("description", "");
+ }
GameDescriptor(const PlainGameDescriptor &pgd) {
setVal("gameid", pgd.gameid);
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