aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrichiesams2013-08-05 19:20:36 -0500
committerrichiesams2013-08-05 19:20:36 -0500
commitb98a8fbf12717457c087b4e169d72f461310c667 (patch)
treef1a8d61a2bb44824966f324c4949aba0cf7577a2
parent931ad00a2d208335fc45885bfc7f53a53e6d9dce (diff)
downloadscummvm-rg350-b98a8fbf12717457c087b4e169d72f461310c667.tar.gz
scummvm-rg350-b98a8fbf12717457c087b4e169d72f461310c667.tar.bz2
scummvm-rg350-b98a8fbf12717457c087b4e169d72f461310c667.zip
ZVISION: Fix loop logic so videos can end
-rw-r--r--engines/zvision/video.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/zvision/video.cpp b/engines/zvision/video.cpp
index f27c3faab8..32f7b1fc8a 100644
--- a/engines/zvision/video.cpp
+++ b/engines/zvision/video.cpp
@@ -98,9 +98,9 @@ void ZVision::playVideo(Video::VideoDecoder &videoDecoder) {
videoDecoder.start();
// Only continue while the video is still playing
- while (videoDecoder.isPlaying()) {
+ while (!shouldQuit() && !videoDecoder.endOfVideo() && videoDecoder.isPlaying()) {
// Check for engine quit and video stop key presses
- while (_eventMan->pollEvent(_event)) {
+ while (!videoDecoder.endOfVideo() && videoDecoder.isPlaying() && _eventMan->pollEvent(_event)) {
switch (_event.type) {
case Common::EVENT_KEYDOWN:
switch (_event.kbd.keycode) {