diff options
-rw-r--r-- | engines/bladerunner/ui/kia.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/engines/bladerunner/ui/kia.cpp b/engines/bladerunner/ui/kia.cpp index 9ec9d686c0..32704fc7d2 100644 --- a/engines/bladerunner/ui/kia.cpp +++ b/engines/bladerunner/ui/kia.cpp @@ -663,7 +663,13 @@ void KIA::mouseDownCallback(int buttonId, void *callbackData) { case 14: self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxBUTN5P), 70, 0, 0, 50, 0); if (buttonId == 12) { - self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxSHUTDOWN), 70, 0, 0, 50, 0); + int endTrackId = self->_vm->_audioPlayer->playAud(self->_vm->_gameInfo->getSfxTrack(kSfxSHUTDOWN), 70, 0, 0, 50, 0); + if (endTrackId != -1) { + // wait until the full clip has played (similar to the original) + while (self->_vm->_audioPlayer->isActive(endTrackId)) { + self->_vm->_system->delayMillis(16); + } + } } break; case 15: |