aboutsummaryrefslogtreecommitdiff
path: root/gui/editgamedialog.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2016-09-25 08:45:42 +0200
committerBastien Bouclet2019-11-03 11:43:00 +0100
commitc142838122c49811a3b77c6909705aab7121c6ff (patch)
tree584abe3781b731f45ee09850a1bc481b3d04c7b6 /gui/editgamedialog.cpp
parent47a2b2a9a21c0134254cc9cb2990cc30c7ca1a66 (diff)
downloadscummvm-rg350-c142838122c49811a3b77c6909705aab7121c6ff.tar.gz
scummvm-rg350-c142838122c49811a3b77c6909705aab7121c6ff.tar.bz2
scummvm-rg350-c142838122c49811a3b77c6909705aab7121c6ff.zip
BASE: Change the command line interface to use engine-qualified game names
Qualified game names have the following form: engineId:gameId. Unqualified game names are still supported as long as they are not ambiguous. However they are considered deprecated and are no longer displayed by the --list-games command.
Diffstat (limited to 'gui/editgamedialog.cpp')
-rw-r--r--gui/editgamedialog.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 4f3c1647a1..1b34a4753d 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -103,15 +103,11 @@ EditGameDialog::EditGameDialog(const String &domain)
EngineMan.upgradeTargetIfNecessary(domain);
// Retrieve all game specific options.
- const Plugin *plugin = nullptr;
- // To allow for game domains without a gameid.
- // TODO: Is it intentional that this is still supported?
- String gameId(ConfMan.get("gameid", domain));
- if (gameId.empty())
- gameId = domain;
+
// Retrieve the plugin, since we need to access the engine's MetaEngine
// implementation.
- PlainGameDescriptor pgd = EngineMan.findGame(gameId, &plugin);
+ const Plugin *plugin = nullptr;
+ QualifiedGameDescriptor qgd = EngineMan.findTarget(domain, &plugin);
if (plugin) {
_engineOptions = plugin->get<MetaEngine>().getExtraGuiOptions(domain);
} else {
@@ -125,8 +121,8 @@ EditGameDialog::EditGameDialog(const String &domain)
// GAME: Determine the description string
String description(ConfMan.get("description", domain));
- if (description.empty() && pgd.description) {
- description = pgd.description;
+ if (description.empty() && qgd.description) {
+ description = qgd.description;
}
// GUI: Add tab widget