aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorBastien Bouclet2017-12-02 17:14:22 +0100
committerBastien Bouclet2018-05-10 09:04:23 +0200
commitcf1ebf29516bd74927fd7b632b72fd8973f72e98 (patch)
treee928c3c13903db53bc7badc9ea4eb98741d9d58d /engines/scumm
parent9587dd5c21d388616dc8d42db909390fab384c2f (diff)
downloadscummvm-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/scumm')
-rw-r--r--engines/scumm/detection.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 9573db55cd..078cc8de27 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -961,7 +961,7 @@ public:
virtual bool hasFeature(MetaEngineFeature f) const;
virtual GameList getSupportedGames() const;
virtual GameDescriptor findGame(const char *gameid) const;
- virtual GameList detectGames(const Common::FSList &fslist, bool useUnknownGameDialog = false) const;
+ virtual DetectedGames detectGames(const Common::FSList &fslist) const override;
virtual Common::Error createInstance(OSystem *syst, Engine **engine) const;
@@ -1026,29 +1026,30 @@ static Common::String generatePreferredTarget(const DetectorResult &x) {
return res;
}
-GameList ScummMetaEngine::detectGames(const Common::FSList &fslist, bool /*useUnknownGameDialog*/) const {
- GameList detectedGames;
+DetectedGames ScummMetaEngine::detectGames(const Common::FSList &fslist) const {
+ DetectedGames detectedGames;
Common::List<DetectorResult> results;
-
::detectGames(fslist, results, 0);
for (Common::List<DetectorResult>::iterator
x = results.begin(); x != results.end(); ++x) {
const PlainGameDescriptor *g = findPlainGameDescriptor(x->game.gameid, gameDescriptions);
assert(g);
- GameDescriptor dg(x->game.gameid, g->description, x->language, x->game.platform);
+
+ DetectedGame game;
+ game.matchedGame = GameDescriptor(x->game.gameid, g->description, x->language, x->game.platform);
// Append additional information, if set, to the description.
- dg.updateDesc(x->extra);
+ game.matchedGame.updateDesc(x->extra);
// Compute and set the preferred target name for this game.
// Based on generateComplexID() in advancedDetector.cpp.
- dg["preferredtarget"] = generatePreferredTarget(*x);
+ game.matchedGame["preferredtarget"] = generatePreferredTarget(*x);
- dg.setGUIOptions(x->game.guioptions + MidiDriver::musicType2GUIO(x->game.midi));
- dg.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(x->language));
+ game.matchedGame.setGUIOptions(x->game.guioptions + MidiDriver::musicType2GUIO(x->game.midi));
+ game.matchedGame.appendGUIOptions(getGameGUIOptionsDescriptionLanguage(x->language));
- detectedGames.push_back(dg);
+ detectedGames.push_back(game);
}
return detectedGames;