[Scummvm-git-logs] scummvm master -> 4e4c18499076c208b19305843fd89df76eb28792
sev-
noreply at scummvm.org
Mon Jan 9 17:42:32 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
39b7925c84 AD: Allow engines to prefer fallback detection
4e4c184990 SCI: Prefer fallback detection for unknown variants
Commit: 39b7925c84207b56833a3a3e48473c262f5f326f
https://github.com/scummvm/scummvm/commit/39b7925c84207b56833a3a3e48473c262f5f326f
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-01-09T18:42:26+01:00
Commit Message:
AD: Allow engines to prefer fallback detection
Changed paths:
engines/advancedDetector.cpp
engines/advancedDetector.h
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 931bd9965ac..23d5aebdd7f 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -292,6 +292,11 @@ DetectedGames AdvancedMetaEngineDetection::detectGames(const Common::FSList &fsl
fallbackDetectedGame.preferredTarget += "-fallback";
}
+ if (_flags & kADFlagPreferFallbackDetection) {
+ // fallback detection was successful and this engine prefers
+ // it over the partial matches found in the detection table
+ detectedGames.clear();
+ }
detectedGames.push_back(fallbackDetectedGame);
}
}
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index fa4e43230d7..46bbd73a36c 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -241,7 +241,17 @@ enum ADFlags {
* the detector to find files inside subdirectories. @c _directoryGlobs are
* extracted from the entries.
*/
- kADFlagMatchFullPaths = (1 << 1)
+ kADFlagMatchFullPaths = (1 << 1),
+
+ /**
+ * If set, the engine's fallback detection results are used instead of the
+ * partial matches found in the detection table.
+ *
+ * An engine sets this if its fallback detection produces good results that
+ * should always be used. If fallback detection fails, then partial matches
+ * are still used.
+ */
+ kADFlagPreferFallbackDetection = (1 << 2)
};
Commit: 4e4c18499076c208b19305843fd89df76eb28792
https://github.com/scummvm/scummvm/commit/4e4c18499076c208b19305843fd89df76eb28792
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2023-01-09T18:42:26+01:00
Commit Message:
SCI: Prefer fallback detection for unknown variants
Changed paths:
engines/sci/detection.cpp
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 4a5a712e5cf..8103b794847 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -183,7 +183,12 @@ public:
SciMetaEngineDetection() : AdvancedMetaEngineDetection(Sci::SciGameDescriptions, sizeof(ADGameDescription), s_sciGameTitles) {
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
- _flags = kADFlagMatchFullPaths;
+ // Use SCI fallback detection results instead of the partial matches found by
+ // advanced detector. SCI fallback detection is excellent because games have
+ // predictable file names and contain a unique game string.
+ // Advanced detector's partial matches aren't very useful in SCI because of
+ // those similar file names; most games are partial matches of each other.
+ _flags = kADFlagMatchFullPaths | kADFlagPreferFallbackDetection;
}
const DebugChannelDef *getDebugChannels() const override {
More information about the Scummvm-git-logs
mailing list