From ba9efd5c4016fcd755544cb1b68fc1bd42dd8e5e Mon Sep 17 00:00:00 2001 From: Alyssa Milburn Date: Fri, 19 Apr 2013 00:42:28 +0200 Subject: MOHAWK: Allow skipping LB videos, plus other video bits. --- engines/mohawk/livingbooks.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'engines/mohawk/livingbooks.cpp') diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp index 2b0a45d4e6..43e21cfbfb 100644 --- a/engines/mohawk/livingbooks.cpp +++ b/engines/mohawk/livingbooks.cpp @@ -245,6 +245,8 @@ Common::Error MohawkEngine_LivingBooks::run() { case Common::KEYCODE_ESCAPE: if (_curMode == kLBIntroMode) tryLoadPageStart(kLBControlMode, 1); + else + _video->stopVideos(); break; case Common::KEYCODE_LEFT: @@ -3775,7 +3777,7 @@ LBMovieItem::~LBMovieItem() { void LBMovieItem::update() { if (_playing) { VideoHandle videoHandle = _vm->_video->findVideoHandle(_resourceId); - if (_vm->_video->endOfVideo(videoHandle)) + if (videoHandle == NULL_VID_HANDLE || _vm->_video->endOfVideo(videoHandle)) done(true); } @@ -3785,6 +3787,7 @@ void LBMovieItem::update() { bool LBMovieItem::togglePlaying(bool playing, bool restart) { if (playing) { if ((_loaded && _enabled && _globalEnabled) || _phase == kLBPhaseNone) { + debug("toggled video for phase %d", _phase); _vm->_video->playMovie(_resourceId, _rect.left, _rect.top); return true; -- cgit v1.2.3