aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/imd.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/gob/imd.cpp b/engines/gob/imd.cpp
index 7f2ad3d211..4d2e6c7243 100644
--- a/engines/gob/imd.cpp
+++ b/engines/gob/imd.cpp
@@ -1217,8 +1217,13 @@ uint32 ImdPlayer::view(Imd *imdPtr, int16 frame) {
}
inline void ImdPlayer::waitEndSoundSlice() {
+ uint32 timeKey = _vm->_util->getTimeKey();
+ int32 waitTime = _soundSliceLength;
+
_vm->_video->retrace();
- _vm->_util->delay(_soundSliceLength);
+ waitTime -= _vm->_util->getTimeKey() - timeKey;
+ if (waitTime > 0)
+ _vm->_util->delay(waitTime);
}
} // End of namespace Gob