aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorEugene Sandulenko2007-01-28 01:01:36 +0000
committerEugene Sandulenko2007-01-28 01:01:36 +0000
commitb8a48f5751d77f4f4961314ab05bdb4341619114 (patch)
treef09ba37435f951e1b6395b3d406d184ef41e6dd7 /base
parent23a1efe628f1959b164dd06407acc35a8fdbdac6 (diff)
downloadscummvm-rg350-b8a48f5751d77f4f4961314ab05bdb4341619114.tar.gz
scummvm-rg350-b8a48f5751d77f4f4961314ab05bdb4341619114.tar.bz2
scummvm-rg350-b8a48f5751d77f4f4961314ab05bdb4341619114.zip
Fix regression which prevented to run games specified only in command line
and not in config file. svn-id: r25240
Diffstat (limited to 'base')
-rw-r--r--base/commandLine.cpp3
-rw-r--r--base/game.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 68d31276f8..8b70a8ddb3 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -647,7 +647,8 @@ bool processSettings(Common::String &command, Common::StringMap &settings) {
// 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());
diff --git a/base/game.cpp b/base/game.cpp
index a20acaae95..cc0cb2c846 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.gameid().empty()) {
+ if (result.contains("gameid") && !result["gameid"].empty()) {
if (plugin)
*plugin = *iter;
break;