[Scummvm-cvs-logs] scummvm master -> 3d44877732544e808b72398e7947ff9b32f507dd

Strangerke Strangerke at scummvm.org
Wed Oct 30 08:09:22 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
3d44877732 TOON: Fix CID 1004156


Commit: 3d44877732544e808b72398e7947ff9b32f507dd
    https://github.com/scummvm/scummvm/commit/3d44877732544e808b72398e7947ff9b32f507dd
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-10-30T00:08:22-07:00

Commit Message:
TOON: Fix CID 1004156

Changed paths:
    engines/toon/movie.cpp
    engines/toon/movie.h



diff --git a/engines/toon/movie.cpp b/engines/toon/movie.cpp
index f0463a5..9e8514d 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 a380853..14287d8 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;






More information about the Scummvm-git-logs mailing list