SHARE
TWEET

Untitled

a guest Apr 24th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff --git a/base/plugins.cpp b/base/plugins.cpp
  2. index 18755003b4..ae2a439ee5 100644
  3. --- a/base/plugins.cpp
  4. +++ b/base/plugins.cpp
  5. @@ -514,7 +514,7 @@ GameDescriptor EngineManager::findGameInLoadedPlugins(const Common::String &game
  6.     return result;
  7.  }
  8.  
  9. -GameList EngineManager::detectGames(const Common::FSList &fslist) const {
  10. +GameList EngineManager::detectGames(const Common::FSList &fslist, bool use_unknown_dialog) const {
  11.     GameList candidates;
  12.     PluginList plugins;
  13.     PluginList::const_iterator iter;
  14. diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
  15. index aadad74f6c..bc857146c4 100644
  16. --- a/engines/advancedDetector.cpp
  17. +++ b/engines/advancedDetector.cpp
  18. @@ -150,7 +150,7 @@ bool cleanupPirated(ADGameDescList &matched) {
  19.  }
  20.  
  21.  
  22. -GameList AdvancedMetaEngine::detectGames(const Common::FSList &fslist) const {
  23. +GameList AdvancedMetaEngine::detectGames(const Common::FSList &fslist, bool use_unknown_dialog) const {
  24.     ADGameDescList matches;
  25.     GameList detectedGames;
  26.     FileMap allFiles;
  27. @@ -327,7 +327,7 @@ Common::Error AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine)
  28.         return Common::kNoError;
  29.  }
  30.  
  31. -void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds) const {
  32. +void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds, bool use_unknown_dialog) const {
  33.     const char *reportCommon = "The game in '%s' seems to be an unknown %s engine game "
  34.                                "variant.\n\nPlease report the following data to the ScummVM "
  35.                                "team at %s along with the name of the game you tried to add and "
  36. @@ -373,7 +373,7 @@ void AdvancedMetaEngine::reportUnknown(const Common::FSNode &path, const ADFileP
  37.     g_system->logMessage(LogMessageType::kInfo, reportLog.c_str());
  38.  
  39.     // Check if the GUI is running, show the UnknownGameDialog and print the translated unknown game information
  40. -   if (GUI::GuiManager::hasInstance() && g_gui.isActive()) {
  41. +   if (GUI::GuiManager::hasInstance() && g_gui.isActive() && use_unknown_dialog == true) {
  42.         UnknownGameDialog dialog(report, reportTranslated, bugtrackerAffectedEngine);
  43.         dialog.runModal();
  44.     }
  45. diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
  46. index 5160a99679..c6235a92ab 100644
  47. --- a/engines/advancedDetector.h
  48. +++ b/engines/advancedDetector.h
  49. @@ -278,7 +278,7 @@ public:
  50.  
  51.     virtual GameDescriptor findGame(const char *gameId) const;
  52.  
  53. -   virtual GameList detectGames(const Common::FSList &fslist) const;
  54. +   virtual GameList detectGames(const Common::FSList &fslist, bool use_unknown_dialog = false) const;
  55.  
  56.     virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
  57.  
  58. @@ -333,7 +333,7 @@ protected:
  59.      * Log and print a report that we found an unknown game variant, together with the file
  60.      * names, sizes and MD5 sums.
  61.      */
  62. -   void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds = ADGameIdList()) const;
  63. +   void reportUnknown(const Common::FSNode &path, const ADFilePropertiesMap &filesProps, const ADGameIdList &matchedGameIds = ADGameIdList(), bool use_unknown_dialog = false) const;
  64.  
  65.     // TODO
  66.     void updateGameDescriptor(GameDescriptor &desc, const ADGameDescription *realDesc) const;
  67. diff --git a/engines/metaengine.h b/engines/metaengine.h
  68. index b3aaa96a8f..d3b8230097 100644
  69. --- a/engines/metaengine.h
  70. +++ b/engines/metaengine.h
  71. @@ -79,7 +79,7 @@ public:
  72.      * (possibly empty) list of games supported by the engine which it was able
  73.      * to detect amongst the given files.
  74.      */
  75. -   virtual GameList detectGames(const Common::FSList &fslist) const = 0;
  76. +   virtual GameList detectGames(const Common::FSList &fslist, bool use_unknown_dialog = false) const = 0;
  77.  
  78.     /**
  79.      * Tries to instantiate an engine instance based on the settings of
  80. @@ -269,7 +269,7 @@ class EngineManager : public Common::Singleton<EngineManager> {
  81.  public:
  82.     GameDescriptor findGameInLoadedPlugins(const Common::String &gameName, const Plugin **plugin = NULL) const;
  83.     GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin = NULL) const;
  84. -   GameList detectGames(const Common::FSList &fslist) const;
  85. +   GameList detectGames(const Common::FSList &fslist, bool use_unknown_dialog = false) const;
  86.     const PluginList &getPlugins() const;
  87.  };
  88.  
  89. diff --git a/gui/launcher.cpp b/gui/launcher.cpp
  90. index 4fe1ae79c8..857d7d001a 100644
  91. --- a/gui/launcher.cpp
  92. +++ b/gui/launcher.cpp
  93. @@ -573,7 +573,7 @@ bool LauncherDialog::doGameDetection(const Common::String &path) {
  94.  
  95.     // ...so let's determine a list of candidates, games that
  96.     // could be contained in the specified directory.
  97. -   GameList candidates(EngineMan.detectGames(files));
  98. +   GameList candidates(EngineMan.detectGames(files, true));
  99.  
  100.     int idx;
  101.     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. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top