aboutsummaryrefslogtreecommitdiff
path: root/gui/massadd.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-12-02 17:14:22 +0100
committerBastien Bouclet2018-05-10 09:04:23 +0200
commitcf1ebf29516bd74927fd7b632b72fd8973f72e98 (patch)
treee928c3c13903db53bc7badc9ea4eb98741d9d58d /gui/massadd.cpp
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 'gui/massadd.cpp')
-rw-r--r--gui/massadd.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/gui/massadd.cpp b/gui/massadd.cpp
index db569fac82..2774d476db 100644
--- a/gui/massadd.cpp
+++ b/gui/massadd.cpp
@@ -187,7 +187,12 @@ void MassAddDialog::handleTickle() {
}
// Run the detector on the dir
- GameList candidates(EngineMan.detectGames(files));
+ DetectionResults detectionResults = EngineMan.detectGames(files);
+
+ if (detectionResults.foundUnknownGames()) {
+ Common::String report = detectionResults.generateUnknownGameReport(false, 80);
+ g_system->logMessage(LogMessageType::kInfo, report.c_str());
+ }
// Just add all detected games / game variants. If we get more than one,
// that either means the directory contains multiple games, or the detector
@@ -195,8 +200,9 @@ void MassAddDialog::handleTickle() {
// case, let the user choose which entries he wants to keep.
//
// However, we only add games which are not already in the config file.
- for (GameList::const_iterator cand = candidates.begin(); cand != candidates.end(); ++cand) {
- GameDescriptor result = *cand;
+ DetectedGames candidates = detectionResults.listRecognizedGames();
+ for (DetectedGames::const_iterator cand = candidates.begin(); cand != candidates.end(); ++cand) {
+ const GameDescriptor &result = cand->matchedGame;
Common::String path = dir.getPath();
// Remove trailing slashes
@@ -224,7 +230,6 @@ void MassAddDialog::handleTickle() {
break; // Skip duplicates
}
}
- result["path"] = path;
_games.push_back(result);
_list->append(result.description());