[Scummvm-git-logs] scummvm master -> d07c009d7e7e8e2dce1852954521ab08224b1beb
criezy
criezy at scummvm.org
Wed Aug 26 20:36:47 UTC 2020
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:
d07c009d7e SWORD1: Fix detection code for Mac demo
Commit: d07c009d7e7e8e2dce1852954521ab08224b1beb
https://github.com/scummvm/scummvm/commit/d07c009d7e7e8e2dce1852954521ab08224b1beb
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-08-26T21:35:45+01:00
Commit Message:
SWORD1: Fix detection code for Mac demo
It was using the wrong file count define when iterating on the files.
Fortunately the one being used has currently the same value as the
one that should have been used. So it was working correctly despite
the bug.
Also reorder the defines to match the order of the files in the
g_filesToCheck array.
Changed paths:
engines/sword1/detection.cpp
diff --git a/engines/sword1/detection.cpp b/engines/sword1/detection.cpp
index 2f0cf0d3d6..02e5f60a56 100644
--- a/engines/sword1/detection.cpp
+++ b/engines/sword1/detection.cpp
@@ -54,10 +54,10 @@ static const char *const g_dirNames[] = { "clusters", "speech", "english", "ital
#define NUM_COMMON_FILES_TO_CHECK 1
#define NUM_PC_FILES_TO_CHECK 3
#define NUM_MAC_FILES_TO_CHECK 4
-#define NUM_PSX_FILES_TO_CHECK 1
-#define NUM_PSX_DEMO_FILES_TO_CHECK 2
#define NUM_DEMO_FILES_TO_CHECK 1
#define NUM_MAC_DEMO_FILES_TO_CHECK 1
+#define NUM_PSX_FILES_TO_CHECK 1
+#define NUM_PSX_DEMO_FILES_TO_CHECK 2
#define NUM_FILES_TO_CHECK NUM_COMMON_FILES_TO_CHECK + NUM_PC_FILES_TO_CHECK + NUM_MAC_FILES_TO_CHECK + NUM_PSX_FILES_TO_CHECK + NUM_DEMO_FILES_TO_CHECK + NUM_MAC_DEMO_FILES_TO_CHECK + NUM_PSX_DEMO_FILES_TO_CHECK
static const char *const g_filesToCheck[NUM_FILES_TO_CHECK] = { // these files have to be found
@@ -206,7 +206,7 @@ DetectedGames SwordMetaEngine::detectGames(const Common::FSList &fslist) const {
for (j = 0; j < NUM_DEMO_FILES_TO_CHECK; i++, j++)
if (!filesFound[i])
demoFilesFound = false;
- for (j = 0; j < NUM_DEMO_FILES_TO_CHECK; i++, j++)
+ for (j = 0; j < NUM_MAC_DEMO_FILES_TO_CHECK; i++, j++)
if (!filesFound[i])
macDemoFilesFound = false;
for (j = 0; j < NUM_PSX_FILES_TO_CHECK; i++, j++)
More information about the Scummvm-git-logs
mailing list