aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMax Horn2007-01-28 10:29:22 +0000
committerMax Horn2007-01-28 10:29:22 +0000
commitd32b1b1b7a64448ab0a456a8b10008c269183c0e (patch)
tree71ff706108d3f10bb1eb7b5a29ad1213cb86b400 /base
parent93687d376b0682b1f24878cc071a7196f838ddaa (diff)
downloadscummvm-rg350-d32b1b1b7a64448ab0a456a8b10008c269183c0e.tar.gz
scummvm-rg350-d32b1b1b7a64448ab0a456a8b10008c269183c0e.tar.bz2
scummvm-rg350-d32b1b1b7a64448ab0a456a8b10008c269183c0e.zip
Always set gameid & description in a GameDescriptor (somewhat more future proof fix for the recent regression caused by the changes to gameid() / description() )
svn-id: r25242
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp2
-rw-r--r--base/game.cpp2
-rw-r--r--base/game.h5
3 files changed, 6 insertions, 3 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 8b70a8ddb3..06d08d05fa 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -648,7 +648,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) {
// 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());
diff --git a/base/game.cpp b/base/game.cpp
index cc0cb2c846..a20acaae95 100644
--- a/base/game.cpp
+++ b/base/game.cpp
@@ -68,7 +68,7 @@ GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin) {
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;
diff --git a/base/game.h b/base/game.h
index 99504b276c..8ff8fc8f3d 100644
--- a/base/game.h
+++ b/base/game.h
@@ -36,7 +36,10 @@ struct PlainGameDescriptor {
class GameDescriptor : public Common::StringMap {
public:
- GameDescriptor() {}
+ GameDescriptor() {
+ setVal("gameid", "");
+ setVal("description", "");
+ }
GameDescriptor(const PlainGameDescriptor &pgd) {
setVal("gameid", pgd.gameid);