diff options
author | Torbjörn Andersson | 2006-01-23 19:08:47 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2006-01-23 19:08:47 +0000 |
commit | a7dbba14f714a9892757dfefd1b32bcad8217ca8 (patch) | |
tree | b627b6e334fb98151d0dc35836a55c49bc5a800d /scumm/script_v6.cpp | |
parent | d2d40a0c784f457d28fcfb42a6164f424763c352 (diff) | |
download | scummvm-rg350-a7dbba14f714a9892757dfefd1b32bcad8217ca8.tar.gz scummvm-rg350-a7dbba14f714a9892757dfefd1b32bcad8217ca8.tar.bz2 scummvm-rg350-a7dbba14f714a9892757dfefd1b32bcad8217ca8.zip |
Added workaround (the nicer one) for a CoMI script bug that would cause
ScummVM to hang on the PSP. See bug #1398195. (For now, I'm only doing this
on the trunk since CoMI on the PSP is considered unsupported/unbearable
with ScummVM 0.8.x.)
svn-id: r20143
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r-- | scumm/script_v6.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index f3fd1d8fb6..4af2a273eb 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -2254,6 +2254,18 @@ void ScummEngine_v6::o6_soundKludge() { int num = getStackList(list, ARRAYSIZE(list)); _sound->soundKludge(list, num); + + // WORKAROUND for bug #1398195: The room-11-2016 script contains a + // slight bug causing it to busy-wait for a sound to finish. Even under + // the best of circumstances, this will cause the game to hang briefly. + // On platforms where threading is cooperative, it will cause the game + // to hang indefinitely. We identify the buggy part of the script by + // looking for a soundKludge() opcode immediately followed by a jump. + + if (_gameId == GID_CMI && _roomResource == 11 && vm.slot[_currentScript].number == 2016 && *_scriptPointer == 0x66) { + debug(3, "Working around script bug in room-11-2016"); + o6_breakHere(); + } } void ScummEngine_v6::o6_isAnyOf() { |