diff options
author | Strangerke | 2013-10-30 08:07:53 +0100 |
---|---|---|
committer | Strangerke | 2013-10-30 08:08:22 +0100 |
commit | 3d44877732544e808b72398e7947ff9b32f507dd (patch) | |
tree | e74576c4e8a33ee3636ee82224defcf9ce70c3c7 /engines | |
parent | 6926270ca7768d0a3f9876efec57960fa271e272 (diff) | |
download | scummvm-rg350-3d44877732544e808b72398e7947ff9b32f507dd.tar.gz scummvm-rg350-3d44877732544e808b72398e7947ff9b32f507dd.tar.bz2 scummvm-rg350-3d44877732544e808b72398e7947ff9b32f507dd.zip |
TOON: Fix CID 1004156
Diffstat (limited to 'engines')
-rw-r--r-- | engines/toon/movie.cpp | 9 | ||||
-rw-r--r-- | 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; |