diff options
author | Bastien Bouclet | 2018-05-06 12:57:08 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-05-10 09:04:23 +0200 |
commit | 8fb149e3c7603f023dfccf2b2056a9a2fda431c2 (patch) | |
tree | a758cefc70a784a65045d09d96f44ed1c16abbb8 /base/commandLine.cpp | |
parent | cf1ebf29516bd74927fd7b632b72fd8973f72e98 (diff) | |
download | scummvm-rg350-8fb149e3c7603f023dfccf2b2056a9a2fda431c2.tar.gz scummvm-rg350-8fb149e3c7603f023dfccf2b2056a9a2fda431c2.tar.bz2 scummvm-rg350-8fb149e3c7603f023dfccf2b2056a9a2fda431c2.zip |
ENGINES: Change MetaEngine::findGame to return a plain game descriptor
Diffstat (limited to 'base/commandLine.cpp')
-rw-r--r-- | base/commandLine.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 8e701408ef..0755165094 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -714,10 +714,10 @@ static void listTargets() { // FIXME: At this point, we should check for a "gameid" override // to find the proper desc. In fact, the platform probably should // be taken into account, too. - Common::String gameid(name); - GameDescriptor g = EngineMan.findGame(gameid); - if (g.description().size() > 0) - description = g.description(); + const Common::String &gameid = name; + PlainGameDescriptor g = EngineMan.findGame(gameid); + if (g.description) + description = g.description; } targets.push_back(Common::String::format("%-20s %s", name.c_str(), description.c_str())); @@ -770,7 +770,7 @@ static Common::Error listSaves(const Common::String &target) { // Find the plugin that will handle the specified gameid const Plugin *plugin = nullptr; - GameDescriptor game = EngineMan.findGame(gameid, &plugin); + EngineMan.findGame(gameid, &plugin); if (!plugin) { // If the target was specified, treat this as an error, and otherwise skip it. @@ -1276,8 +1276,8 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo // domain (i.e. a target) matching this argument, or alternatively // whether there is a gameid matching that name. if (!command.empty()) { - GameDescriptor gd = EngineMan.findGame(command); - if (ConfMan.hasGameDomain(command) || !gd.gameid().empty()) { + PlainGameDescriptor gd = EngineMan.findGame(command); + if (ConfMan.hasGameDomain(command) || gd.gameId) { bool idCameFromCommandLine = false; // WORKAROUND: Fix for bug #1719463: "DETECTOR: Launching |