From b2a148e12c49043855775f414249d49f5ee78b59 Mon Sep 17 00:00:00 2001 From: Walter van Niftrik Date: Sun, 11 Oct 2009 02:47:07 +0000 Subject: SCI: Fix hang in KQ6 book worm scene svn-id: r44889 --- engines/sci/engine/ksound.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'engines/sci/engine') diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp index feb5bd523f..8daaf6f22a 100644 --- a/engines/sci/engine/ksound.cpp +++ b/engines/sci/engine/ksound.cpp @@ -944,6 +944,15 @@ static reg_t kDoSoundSci1Late(EngineState *s, int argc, reg_t *argv) { break; } case _K_SCI1_SOUND_SET_HANDLE_LOOP : { + if (!GET_SEL32(obj, nodePtr).isNull()) { + uint16 looping = argv[2].toUint16(); + + if (looping < 65535) + looping = 1; + + s->_sound.sfx_song_set_loops(handle, looping); + PUT_SEL32V(obj, loop, looping); + } break; } case _K_SCI1_SOUND_UPDATE_CUES : { -- cgit v1.2.3