Tweak SCUMM detection a bit more -- do not hard code a check for the genmethod to determine the platform value, but rather use the platform value the GameFilenamePattern provides

svn-id: r23260
This commit is contained in:
Max Horn 2006-06-22 17:57:37 +00:00
parent 70b5453731
commit f5128aeaf5

View File

@ -991,16 +991,13 @@ static void detectGames(const FSList &fslist, Common::List<DetectorResult> &resu
dr.game = *g;
dr.game.gameid = d.md5Entry->gameid;
// Sanity check
if (dr.game.platform != Common::kPlatformUnknown && dr.game.platform != d.md5Entry->platform)
warning("SCUMM detectGames: Platform values differ for MD5 '%s': %d vs %d (please report to Fingolfin)",
md5str, dr.game.platform, d.md5Entry->platform);
// Force game to have Mac platform, if required by HE game
if (dr.fp.genMethod == kGenHEMac || dr.fp.genMethod == kGenHEMacNoParens) {
dr.game.platform = Common::kPlatformMacintosh;
} else {
// Set the platform value. The value from the MD5 record has
// highest priority; if missing (i.e. set to unknown) we try
// to use that from the filename pattern record instead.
if (d.md5Entry->platform != Common::kPlatformUnknown) {
dr.game.platform = d.md5Entry->platform;
} else if (gfp->platform != Common::kPlatformUnknown) {
dr.game.platform = gfp->platform;
}
// HACK: Special case to distinguish the V1 demo from the full version