SHARE
TWEET
Untitled
a guest
Apr 24th, 2018
50
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- diff --git a/base/plugins.cpp b/base/plugins.cpp
- index 18755003b4..ae2a439ee5 100644
- --- a/base/plugins.cpp
- +++ b/base/plugins.cpp
- @@ -514,7 +514,7 @@ GameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String &game
- return result;
- }
- -GameList EngineManager::detectGames(const Common::FSList &fslist) const {
- +GameList EngineManager::detectGames(const Common::FSList &fslist, bool use_unknown_dialog) const {
- GameList candidates;
- PluginList plugins;
- PluginList::const_iterator iter;
- diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
- index aadad74f6c..bc857146c4 100644
- --- a/engines/advancedDetector.cpp
- +++ b/engines/advancedDetector.cpp
- @@ -150,7 +150,7 @@ bool cleanupPirated(ADGameDescList &matched) {
- }
- -GameList AdvancedMetaEngine::detectGames(const Common::FSList &fslist) const {
- +GameList AdvancedMetaEngine::detectGames(const Common::FSList &fslist, bool use_unknown_dialog) const {
- ADGameDescList matches;
- GameList detectedGames;
- FileMap allFiles;
- @@ -327,7 +327,7 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
- return Common::kNoError;
- }
- -void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds) const {
- +void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds, bool use_unknown_dialog) const {
- const char *reportCommon = "The game in '%s' seems to be an unknown %s engine game "
- "variant.\n\nPlease report the following data to the ScummVM "
- "team at %s along with the name of the game you tried to add and "
- @@ -373,7 +373,7 @@ void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFileP
- g_system->logMessage(LogMessageType::kInfo, reportLog.c_str());
- // Check if the GUI is running, show the UnknownGameDialog and print the translated unknown game information
- - if (GUI::GuiManager::hasInstance() && g_gui.isActive()) {
- + if (GUI::GuiManager::hasInstance() && g_gui.isActive() && use_unknown_dialog == true) {
- UnknownGameDialog dialog(report, reportTranslated, bugtrackerAffectedEngine);
- dialog.runModal();
- }
- diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
- index 5160a99679..c6235a92ab 100644
- --- a/engines/advancedDetector.h
- +++ b/engines/advancedDetector.h
- @@ -278,7 +278,7 @@ public:
- virtual GameDescriptor findGame(const char *gameId) const;
- - virtual GameList detectGames(const Common::FSList &fslist) const;
- + virtual GameList detectGames(const Common::FSList &fslist, bool use_unknown_dialog = false) const;
- virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
- @@ -333,7 +333,7 @@ protected:
- * Log and print a report that we found an unknown game variant, together with the file
- * names, sizes and MD5 sums.
- */
- - void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds = ADGameIdList()) const;
- + void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds = ADGameIdList(), bool use_unknown_dialog = false) const;
- // TODO
- void updateGameDescriptor(GameDescriptor &desc, const ADGameDescription *realDesc) const;
- diff --git a/engines/metaengine.h b/engines/metaengine.h
- index b3aaa96a8f..d3b8230097 100644
- --- a/engines/metaengine.h
- +++ b/engines/metaengine.h
- @@ -79,7 +79,7 @@ public:
- * (possibly empty) list of games supported by the engine which it was able
- * to detect amongst the given files.
- */
- - virtual GameList detectGames(const Common::FSList &fslist) const = 0;
- + virtual GameList detectGames(const Common::FSList &fslist, bool use_unknown_dialog = false) const = 0;
- /**
- * Tries to instantiate an engine instance based on the settings of
- @@ -269,7 +269,7 @@ class EngineManager : public Common::Singleton<EngineManager> {
- public:
- GameDescriptor findGameInLoadedPlugins(const Common::String &gameName, const Plugin **plugin = NULL) const;
- GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin = NULL) const;
- - GameList detectGames(const Common::FSList &fslist) const;
- + GameList detectGames(const Common::FSList &fslist, bool use_unknown_dialog = false) const;
- const PluginList &getPlugins() const;
- };
- diff --git a/gui/launcher.cpp b/gui/launcher.cpp
- index 4fe1ae79c8..857d7d001a 100644
- --- a/gui/launcher.cpp
- +++ b/gui/launcher.cpp
- @@ -573,7 +573,7 @@ bool LauncherDialog::doGameDetection(const Common::String &path) {
- // ...so let's determine a list of candidates, games that
- // could be contained in the specified directory.
- - GameList candidates(EngineMan.detectGames(files));
- + GameList candidates(EngineMan.detectGames(files, true));
- int idx;
- if (candidates.empty()) {
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
