diff options
author | Bastien Bouclet | 2011-01-27 21:12:34 +0000 |
---|---|---|
committer | Bastien Bouclet | 2011-01-27 21:12:34 +0000 |
commit | 67c057dc15f3e6c67d9d5fac7f93d6e50321413e (patch) | |
tree | 365c6e9aca333a0f354dc33f06625e083afa9bca /engines/mohawk/video.cpp | |
parent | 03adf7fdf64cf9f739b2d78a613acec16165ed86 (diff) | |
download | scummvm-rg350-67c057dc15f3e6c67d9d5fac7f93d6e50321413e.tar.gz scummvm-rg350-67c057dc15f3e6c67d9d5fac7f93d6e50321413e.tar.bz2 scummvm-rg350-67c057dc15f3e6c67d9d5fac7f93d6e50321413e.zip |
MOHAWK: Allow videos to be paused individually
svn-id: r55576
Diffstat (limited to 'engines/mohawk/video.cpp')
-rw-r--r-- | engines/mohawk/video.cpp | 11 |
1 files changed, 7 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 |