[Scummvm-git-logs] scummvm master -> 643ce81cf7cac87a102cd49a7e23a0d93724b3ce
bgK
bastien.bouclet at gmail.com
Sun Jun 3 13:49:16 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
643ce81cf7 BASE: Remove temporary targets when they fail to launch
Commit: 643ce81cf7cac87a102cd49a7e23a0d93724b3ce
https://github.com/scummvm/scummvm/commit/643ce81cf7cac87a102cd49a7e23a0d93724b3ce
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2018-06-03T13:48:31+02:00
Commit Message:
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.
Changed paths:
base/main.cpp
engines/advancedDetector.cpp
diff --git a/base/main.cpp b/base/main.cpp
index 385b8f3..be561f9 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());
}
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 3167dd9..6f4efcf 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -236,18 +236,6 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
path = ConfMan.get("path");
} else {
path = ".";
-
- // This situation may happen only when game was
- // launched from a command line with wrong target and
- // no path was provided.
- //
- // A dummy entry will get created and will keep game path
- // We mark this entry, so it will not be added to the
- // config file.
- //
- // Fixes bug #1544799
- ConfMan.setBool("autoadded", true);
-
warning("No path was provided. Assuming the data files are in the current directory");
}
Common::FSNode dir(path);
More information about the Scummvm-git-logs
mailing list