From 3d44877732544e808b72398e7947ff9b32f507dd Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 30 Oct 2013 08:07:53 +0100 Subject: TOON: Fix CID 1004156 --- engines/toon/movie.cpp | 9 +++++---- engines/toon/movie.h | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp index f0463a52e1..9e8514d0a8 100644 --- a/engines/toon/movie.cpp +++ b/engines/toon/movie.cpp @@ -85,7 +85,8 @@ void Movie::play(const Common::String &video, int32 flags) { _playing = true; if (flags & 1) _vm->getAudioManager()->setMusicVolume(0); - _decoder->loadFile(video.c_str()); + if (!_decoder->loadFile(video.c_str())) + error("Unable to play video %s", video.c_str()); playVideo(isFirstIntroVideo); _vm->flushPalette(true); if (flags & 1) @@ -94,7 +95,7 @@ void Movie::play(const Common::String &video, int32 flags) { _playing = false; } -bool Movie::playVideo(bool isFirstIntroVideo) { +void Movie::playVideo(bool isFirstIntroVideo) { debugC(1, kDebugMovie, "playVideo(isFirstIntroVideo: %d)", isFirstIntroVideo); _decoder->start(); @@ -135,13 +136,13 @@ bool Movie::playVideo(bool isFirstIntroVideo) { while (_vm->_system->getEventManager()->pollEvent(event)) if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE)) { _vm->dirtyAllScreen(); - return false; + return; } _vm->_system->delayMillis(10); } _vm->dirtyAllScreen(); - return !_vm->shouldQuit(); + return; } } // End of namespace Toon diff --git a/engines/toon/movie.h b/engines/toon/movie.h index a380853780..14287d87fd 100644 --- a/engines/toon/movie.h +++ b/engines/toon/movie.h @@ -53,7 +53,7 @@ public: bool isPlaying() { return _playing; } protected: - bool playVideo(bool isFirstIntroVideo); + void playVideo(bool isFirstIntroVideo); ToonEngine *_vm; ToonstruckSmackerDecoder *_decoder; bool _playing; -- cgit v1.2.3