From 2e0fdda51ff9ff48bb8cbfcc770f9fd99cccd43e Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 20 May 2010 18:38:06 +0000 Subject: Add a pause level system to VideoDecoder (blatantly ripped off from Engine) and adapt Mohawk to it. svn-id: r49120 --- engines/mohawk/video/video.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'engines/mohawk/video/video.cpp') diff --git a/engines/mohawk/video/video.cpp b/engines/mohawk/video/video.cpp index c4991ec06c..ce50653c73 100644 --- a/engines/mohawk/video/video.cpp +++ b/engines/mohawk/video/video.cpp @@ -32,7 +32,6 @@ namespace Mohawk { VideoManager::VideoManager(MohawkEngine* vm) : _vm(vm) { - _pauseStart = 0; } VideoManager::~VideoManager() { @@ -42,17 +41,12 @@ VideoManager::~VideoManager() { void VideoManager::pauseVideos() { for (uint16 i = 0; i < _videoStreams.size(); i++) - _videoStreams[i]->pauseAudio(); - _pauseStart = _vm->_system->getMillis() * 100; + _videoStreams[i]->pauseVideo(true); } void VideoManager::resumeVideos() { - for (uint16 i = 0; i < _videoStreams.size(); i++) { - _videoStreams[i]->addPauseTime(_vm->_system->getMillis() * 100 - _pauseStart); - _videoStreams[i]->resumeAudio(); - } - - _pauseStart = 0; + for (uint16 i = 0; i < _videoStreams.size(); i++) + _videoStreams[i]->pauseVideo(false); } void VideoManager::stopVideos() { -- cgit v1.2.3