[Scummvm-git-logs] scummvm master -> ab93a22db74b3225602dfa79618af3ffc82968e1
bluegr
noreply at scummvm.org
Tue Nov 8 23:54:19 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
ab93a22db7 SCUMM: Also filter demo entries if detector reports multiple hits
Commit: ab93a22db74b3225602dfa79618af3ffc82968e1
https://github.com/scummvm/scummvm/commit/ab93a22db74b3225602dfa79618af3ffc82968e1
Author: Walter Agazzi (walter.agazzi at protonmail.com)
Date: 2022-11-09T01:54:15+02:00
Commit Message:
SCUMM: Also filter demo entries if detector reports multiple hits
When the gamedir contains multiple valid entries, narrow selection
by platform and also demo status. Fixes bug #10117 when using C64
images of both the full version and demo of ManiaC Mansion in the
same folder.
Changed paths:
engines/scumm/metaengine.cpp
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index 9a9b93ddf21..da40f7c02b6 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -299,6 +299,29 @@ Common::Error ScummMetaEngine::createInstance(OSystem *syst, Engine **engine) {
}
}
+ // Still no unique match found. Narrow down again excluding demos using extra
+ // metadata
+ if (results.size() > 1 && ConfMan.hasKey("extra")) {
+ Common::String extra_cfg = ConfMan.get("extra");
+ Common::List<DetectorResult> tmp;
+
+ for (Common::List<DetectorResult>::iterator
+ x = results.begin(); x != results.end(); ++x) {
+
+ // FIXME: there's no demo flag in confman, this is not 100% reliable
+ if (Common::String(x->extra).contains("Demo") && extra_cfg.contains("Demo"))
+ tmp.push_back(*x);
+ }
+
+ // If we narrowed it down too much, print a warning, else use the list
+ // we just computed as new candidates list.
+ if (tmp.empty()) {
+ warning("Engine_SCUMM_create: Game data inconsistent with extra metadata settings");
+ } else {
+ results = tmp;
+ }
+ }
+
// Still no unique match found -> print a warning.
if (results.size() > 1)
warning("Engine_SCUMM_create: No unique game candidate found, using first one");
More information about the Scummvm-git-logs
mailing list