diff options
author | Bastien Bouclet | 2017-12-02 17:14:22 +0100 |
---|---|---|
committer | Bastien Bouclet | 2018-05-10 09:04:23 +0200 |
commit | cf1ebf29516bd74927fd7b632b72fd8973f72e98 (patch) | |
tree | e928c3c13903db53bc7badc9ea4eb98741d9d58d /engines/sludge | |
parent | 9587dd5c21d388616dc8d42db909390fab384c2f (diff) | |
download | scummvm-rg350-cf1ebf29516bd74927fd7b632b72fd8973f72e98.tar.gz scummvm-rg350-cf1ebf29516bd74927fd7b632b72fd8973f72e98.tar.bz2 scummvm-rg350-cf1ebf29516bd74927fd7b632b72fd8973f72e98.zip |
ENGINES: Add unknown game variants to the game detector results
Diffstat (limited to 'engines/sludge')
-rw-r--r-- | engines/sludge/detection.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/sludge/detection.cpp b/engines/sludge/detection.cpp index a530a5c796..85c0f22907 100644 --- a/engines/sludge/detection.cpp +++ b/engines/sludge/detection.cpp @@ -100,10 +100,10 @@ public: } // for fall back detection - virtual const ADGameDescription *fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const; + ADDetectedGame fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const override; }; -const ADGameDescription *SludgeMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { +ADDetectedGame SludgeMetaEngine::fallbackDetect(const FileMap &allFiles, const Common::FSList &fslist) const { // reset fallback description s_fallbackDesc.desc.gameId = "sludge"; s_fallbackDesc.desc.extra = ""; @@ -147,9 +147,19 @@ const ADGameDescription *SludgeMetaEngine::fallbackDetect(const FileMap &allFile s_fallbackFileNameBuffer[50] = '\0'; s_fallbackDesc.desc.filesDescriptions[0].fileName = s_fallbackFileNameBuffer; - return (const ADGameDescription *)&s_fallbackDesc; + ADDetectedGame game; + game.desc = &s_fallbackDesc.desc; + + FileProperties tmp; + if (getFileProperties(file->getParent(), allFiles, s_fallbackDesc.desc, fileName, tmp)) { + game.hasUnknownFiles = true; + game.matchedFiles[fileName] = tmp; + } + + return game; } - return 0; + + return ADDetectedGame(); } #if PLUGIN_ENABLED_DYNAMIC(SLUDGE) |