aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichiesams2013-08-05 10:27:00 -0500
committerrichiesams2013-08-05 10:27:00 -0500
commit3f5cf500498970d2a8f71a9604db31ba00bb262e (patch)
tree8b78a6c4e4f8c0c02faba07a45d27fa3d80c1773
parentcefb0253ae93dc97e73a83145e314caf7e5f2885 (diff)
downloadscummvm-rg350-3f5cf500498970d2a8f71a9604db31ba00bb262e.tar.gz
scummvm-rg350-3f5cf500498970d2a8f71a9604db31ba00bb262e.tar.bz2
scummvm-rg350-3f5cf500498970d2a8f71a9604db31ba00bb262e.zip
ZVISION: Use videoDecoder.getTimeToNextFrame() to calculate the frame delay
-rw-r--r--engines/zvision/video.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp
index 51cccee639..c476cf2d83 100644
--- a/engines/zvision/video.cpp
+++ b/engines/zvision/video.cpp
@@ -99,9 +99,6 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder) {
// Only continue while the video is still playing
while (videoDecoder.isPlaying()) {
- _clock.update();
- uint32 currentTime = _clock.getLastMeasuredTime();
-
// Check for engine quit and video stop key presses
while (_eventMan->pollEvent(_event)) {
switch (_event.type) {
@@ -133,11 +130,7 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder) {
}
}
- // Calculate the frame delay based off a desired frame time
- int delay = _desiredFrameTime - (currentTime - _system->getMillis());
- // Ensure non-negative
- delay = delay < 0 ? 0 : delay;
- _system->delayMillis(delay);
+ _system->delayMillis(videoDecoder.getTimeToNextFrame());
}
_clock.stop();