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
This commit is contained in:
Torbjörn Andersson 2006-01-23 19:08:47 +00:00
parent d2d40a0c78
commit a7dbba14f7

View file

@ -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() {