aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner
diff options
context:
space:
mode:
authorThanasis Antoniou2019-09-09 21:08:41 +0300
committerThanasis Antoniou2019-09-09 21:09:36 +0300
commitf5b79a4cdfc2e481c275eb8fb9b3b833648479c5 (patch)
treefc03bb891713ac0cc02df6864b4b85444e668a18 /engines/bladerunner
parent79fcee786a29d765b0530ec63ad0a7b8a140df8a (diff)
downloadscummvm-rg350-f5b79a4cdfc2e481c275eb8fb9b3b833648479c5.tar.gz
scummvm-rg350-f5b79a4cdfc2e481c275eb8fb9b3b833648479c5.tar.bz2
scummvm-rg350-f5b79a4cdfc2e481c275eb8fb9b3b833648479c5.zip
BLADERUNNER: Play full exit KIA sound before quit via KIA
Diffstat (limited to 'engines/bladerunner')
-rw-r--r--engines/bladerunner/ui/kia.cpp8
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: