[Scummvm-cvs-logs] SF.net SVN: scummvm:[55576] scummvm/trunk/engines/mohawk
bgk at users.sourceforge.net
bgk at users.sourceforge.net
Thu Jan 27 22:12:35 CET 2011
Revision: 55576
http://scummvm.svn.sourceforge.net/scummvm/?rev=55576&view=rev
Author: bgk
Date: 2011-01-27 21:12:34 +0000 (Thu, 27 Jan 2011)
Log Message:
-----------
MOHAWK: Allow videos to be paused individually
Modified Paths:
--------------
scummvm/trunk/engines/mohawk/video.cpp
scummvm/trunk/engines/mohawk/video.h
Modified: scummvm/trunk/engines/mohawk/video.cpp
===================================================================
--- scummvm/trunk/engines/mohawk/video.cpp 2011-01-27 21:12:27 UTC (rev 55575)
+++ scummvm/trunk/engines/mohawk/video.cpp 2011-01-27 21:12:34 UTC (rev 55576)
@@ -147,9 +147,7 @@
}
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 @@
}
// 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 @@
_videoStreams[handle].loop = loop;
}
+void VideoManager::pauseMovie(VideoHandle handle, bool pause) {
+ assert(handle != NULL_VID_HANDLE);
+ _videoStreams[handle]->pauseVideo(pause);
+}
+
} // End of namespace Mohawk
Modified: scummvm/trunk/engines/mohawk/video.h
===================================================================
--- scummvm/trunk/engines/mohawk/video.h 2011-01-27 21:12:27 UTC (rev 55575)
+++ scummvm/trunk/engines/mohawk/video.h 2011-01-27 21:12:34 UTC (rev 55576)
@@ -111,6 +111,7 @@
void setVideoLooping(VideoHandle handle, bool loop);
void waitUntilMovieEnds(VideoHandle videoHandle);
void delayUntilMovieEnds(VideoHandle videoHandle);
+ void pauseMovie(VideoHandle videoHandle, bool pause);
private:
MohawkEngine *_vm;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list