From cf1ebf29516bd74927fd7b632b72fd8973f72e98 Mon Sep 17 00:00:00 2001 From: Bastien Bouclet Date: Sat, 2 Dec 2017 17:14:22 +0100 Subject: ENGINES: Add unknown game variants to the game detector results --- engines/sky/detection.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'engines/sky') diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp index a74b63fb8c..cc1f1adc82 100644 --- a/engines/sky/detection.cpp +++ b/engines/sky/detection.cpp @@ -79,7 +79,7 @@ public: virtual GameList getSupportedGames() const; virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const; virtual GameDescriptor findGame(const char *gameid) const; - virtual GameList detectGames(const Common::FSList &fslist, bool useUnknownGameDialog = false) const; + DetectedGames detectGames(const Common::FSList &fslist) const override; virtual Common::Error createInstance(OSystem *syst, Engine **engine) const; @@ -141,8 +141,8 @@ GameDescriptor SkyMetaEngine::findGame(const char *gameid) const { return GameDescriptor(); } -GameList SkyMetaEngine::detectGames(const Common::FSList &fslist, bool /*useUnknownGameDialog*/) const { - GameList detectedGames; +DetectedGames SkyMetaEngine::detectGames(const Common::FSList &fslist) const { + DetectedGames detectedGames; bool hasSkyDsk = false; bool hasSkyDnr = false; int dinnerTableEntries = -1; @@ -173,18 +173,19 @@ GameList SkyMetaEngine::detectGames(const Common::FSList &fslist, bool /*useUnkn // Match found, add to list of candidates, then abort inner loop. // The game detector uses US English by default. We want British // English to match the recorded voices better. - GameDescriptor dg(skySetting.gameId, skySetting.description, Common::UNK_LANG, Common::kPlatformUnknown); + DetectedGame game; + game.matchedGame = GameDescriptor(skySetting.gameId, skySetting.description, Common::UNK_LANG, Common::kPlatformUnknown); const SkyVersion *sv = skyVersions; while (sv->dinnerTableEntries) { if (dinnerTableEntries == sv->dinnerTableEntries && (sv->dataDiskSize == dataDiskSize || sv->dataDiskSize == -1)) { - dg.updateDesc(Common::String::format("v0.0%d %s", sv->version, sv->extraDesc).c_str()); - dg.setGUIOptions(sv->guioptions); + game.matchedGame.updateDesc(Common::String::format("v0.0%d %s", sv->version, sv->extraDesc).c_str()); + game.matchedGame.setGUIOptions(sv->guioptions); break; } ++sv; } - detectedGames.push_back(dg); + detectedGames.push_back(game); } return detectedGames; -- cgit v1.2.3