aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-08-21 23:12:11 +0000
committerMax Horn2004-08-21 23:12:11 +0000
commit0574c35fa45a856f4176ad72e597311c65b4f677 (patch)
treeb848539a68544c2c061303c924d9733f7caae492
parentd35ef7c7f18034772048bd81aacfd7f947fd075b (diff)
downloadscummvm-rg350-0574c35fa45a856f4176ad72e597311c65b4f677.tar.gz
scummvm-rg350-0574c35fa45a856f4176ad72e597311c65b4f677.tar.bz2
scummvm-rg350-0574c35fa45a856f4176ad72e597311c65b4f677.zip
HACK to work around bug #1009344 (Doesn't distinguish monkey and monkey1)
svn-id: r14670
-rw-r--r--scumm/scumm.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index d6109bf5f7..8303712236 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -3082,9 +3082,25 @@ DetectedGameList Engine_SCUMM_detectGames(const FSList &fslist) {
if (elem) {
if (!exactMatch)
detectedGames.clear(); // Clear all the non-exact candidates
+
+ const char *target = elem->target;
+
+ // HACK to work around bug #1009344
+ if (!strcmp(target, "monkey")) {
+ const char *str = name;
+ int len = 0;
+ // Scan to the end of the string...
+ while (*str++)
+ len++;
+ // ...so that we can check if it ends with 'monkey1.000'
+ const char *monkey1 = "monkey1.000"; // Len: 11
+ if (len >= 11 && !scumm_stricmp(str-11-1, monkey1))
+ target = "monkey1";
+ }
+
// Find the GameSettings for that target
for (g = scumm_settings; g->name; ++g) {
- if (0 == scumm_stricmp(g->name, elem->target))
+ if (0 == scumm_stricmp(g->name, target))
break;
}
assert(g->name);