diff options
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/video.cpp | 11 | ||||
-rw-r--r-- | engines/mohawk/video.h | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 4126803dc6..23843b000b 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -147,9 +147,7 @@ void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) { } void VideoManager::delayUntilMovieEnds(VideoHandle videoHandle) { - bool continuePlaying = true; - - while (!_videoStreams[videoHandle].endOfVideo() && !_vm->shouldQuit() && continuePlaying) { + while (!_videoStreams[videoHandle].endOfVideo() && !_vm->shouldQuit()) { if (updateMovies()) _vm->_system->updateScreen(); @@ -213,7 +211,7 @@ bool VideoManager::updateMovies() { } // Check if we need to draw a frame - if (_videoStreams[i]->needsUpdate()) { + if (!_videoStreams[i]->isPaused() && _videoStreams[i]->needsUpdate()) { const Graphics::Surface *frame = _videoStreams[i]->decodeNextFrame(); Graphics::Surface *convertedFrame = 0; @@ -527,4 +525,9 @@ void VideoManager::setVideoLooping(VideoHandle handle, bool loop) { _videoStreams[handle].loop = loop; } +void VideoManager::pauseMovie(VideoHandle handle, bool pause) { + assert(handle != NULL_VID_HANDLE); + _videoStreams[handle]->pauseVideo(pause); +} + } // End of namespace Mohawk diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 0fb2c95116..efc3bfa0f6 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -111,6 +111,7 @@ public: void setVideoLooping(VideoHandle handle, bool loop); void waitUntilMovieEnds(VideoHandle videoHandle); void delayUntilMovieEnds(VideoHandle videoHandle); + void pauseMovie(VideoHandle videoHandle, bool pause); private: MohawkEngine *_vm; |