aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorBastien Bouclet2011-01-27 21:12:34 +0000
committerBastien Bouclet2011-01-27 21:12:34 +0000
commit67c057dc15f3e6c67d9d5fac7f93d6e50321413e (patch)
tree365c6e9aca333a0f354dc33f06625e083afa9bca /engines/mohawk
parent03adf7fdf64cf9f739b2d78a613acec16165ed86 (diff)
downloadscummvm-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')
-rw-r--r--engines/mohawk/video.cpp11
-rw-r--r--engines/mohawk/video.h1
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;