aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorBastien Bouclet2018-06-03 13:44:40 +0200
committerBastien Bouclet2018-06-03 13:48:31 +0200
commit643ce81cf7cac87a102cd49a7e23a0d93724b3ce (patch)
treec8914cba082a9b05a53469df7a3cdb8d3683d15f /base
parent56d2bf77bae50bb1cb0eab01841cd1a9e7057f30 (diff)
downloadscummvm-rg350-643ce81cf7cac87a102cd49a7e23a0d93724b3ce.tar.gz
scummvm-rg350-643ce81cf7cac87a102cd49a7e23a0d93724b3ce.tar.bz2
scummvm-rg350-643ce81cf7cac87a102cd49a7e23a0d93724b3ce.zip
BASE: Remove temporary targets when they fail to launch
Prevents invalid targets created from the command line to show up in the launcher. Fixes Trac#2788.
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 385b8f35a9..be561f9766 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -193,13 +193,10 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
dir.getPath().c_str()
);
- // Autoadded is set only when no path was provided and
- // the game is run from command line.
- //
- // Thus, we remove this garbage entry
- //
- // Fixes bug #1544799
- if (ConfMan.hasKey("autoadded")) {
+ // If a temporary target failed to launch, remove it from the configuration manager
+ // so it not visible in the launcher.
+ // Temporary targets are created when starting games from the command line using the game id.
+ if (ConfMan.hasKey("id_came_from_command_line")) {
ConfMan.removeGameDomain(ConfMan.getActiveDomainName().c_str());
}