aboutsummaryrefslogtreecommitdiff
path: root/engines/game.cpp
diff options
context:
space:
mode:
authorThierry Crozat2019-04-27 02:34:48 +0100
committerThierry Crozat2019-04-27 02:34:48 +0100
commit40c9930699ab0ee3fc84e40800eb50794c9d93ff (patch)
tree98c764cc742275df6dd4e100d987760a1f891958 /engines/game.cpp
parentfb0fc9bb7ac24e821bf4e642a2a40f3ac1df5087 (diff)
downloadscummvm-rg350-40c9930699ab0ee3fc84e40800eb50794c9d93ff.tar.gz
scummvm-rg350-40c9930699ab0ee3fc84e40800eb50794c9d93ff.tar.bz2
scummvm-rg350-40c9930699ab0ee3fc84e40800eb50794c9d93ff.zip
ENGINES: Add function in DetectionResults to get list of engines with an unknown variants
Diffstat (limited to 'engines/game.cpp')
-rw-r--r--engines/game.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/game.cpp b/engines/game.cpp
index ee14acf7c8..bb5f4ae6cb 100644
--- a/engines/game.cpp
+++ b/engines/game.cpp
@@ -142,7 +142,7 @@ bool DetectionResults::foundUnknownGames() const {
return false;
}
-DetectedGames DetectionResults::listRecognizedGames() {
+DetectedGames DetectionResults::listRecognizedGames() const {
DetectedGames candidates;
for (uint i = 0; i < _detectedGames.size(); i++) {
if (_detectedGames[i].canBeAdded) {
@@ -214,3 +214,18 @@ Common::String DetectionResults::generateUnknownGameReport(bool translate, uint3
return report;
}
+
+Common::StringArray DetectionResults::getUnknownGameEngines() const {
+ Common::StringArray engines;
+ const char *currentEngineName = nullptr;
+ for (uint i = 0; i < _detectedGames.size(); i++) {
+ const DetectedGame &game = _detectedGames[i];
+ if (!game.hasUnknownFiles)
+ continue;
+ if (!currentEngineName || strcmp(currentEngineName, game.engineName) != 0) {
+ currentEngineName = game.engineName;
+ engines.push_back(Common::String(currentEngineName));
+ }
+ }
+ return engines;
+}