[Scummvm-cvs-logs] SF.net SVN: scummvm:[55354] scummvm/trunk/engines/gob

drmccoy at users.sourceforge.net drmccoy at users.sourceforge.net
Thu Jan 20 16:29:32 CET 2011


Revision: 55354
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55354&view=rev
Author:   drmccoy
Date:     2011-01-20 15:29:32 +0000 (Thu, 20 Jan 2011)

Log Message:
-----------
GOB: Make blocking videos default

Modified Paths:
--------------
    scummvm/trunk/engines/gob/inter_v6.cpp
    scummvm/trunk/engines/gob/videoplayer.cpp
    scummvm/trunk/engines/gob/videoplayer.h

Modified: scummvm/trunk/engines/gob/inter_v6.cpp
===================================================================
--- scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-20 12:40:42 UTC (rev 55353)
+++ scummvm/trunk/engines/gob/inter_v6.cpp	2011-01-20 15:29:32 UTC (rev 55354)
@@ -169,7 +169,7 @@
 		close = false;
 	}
 
-	_vm->_vidPlayer->evaluateFlags(props);
+	_vm->_vidPlayer->evaluateFlags(props, true);
 
 	int slot = 0;
 	if ((fileName[0] != 0) && ((slot = _vm->_vidPlayer->openVideo(true, fileName, props)) < 0)) {
@@ -177,11 +177,6 @@
 		return;
 	}
 
-	if(!(props.flags & 0x1000) && !(props.flags & VideoPlayer::kFlagNoVideo))
-		props.flags |= VideoPlayer::kFlagNonBlocking;
-	else
-		props.flags &= ~0x1000;
-
 	if (props.startFrame >= 0)
 		_vm->_vidPlayer->play(slot, props);
 

Modified: scummvm/trunk/engines/gob/videoplayer.cpp
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-20 12:40:42 UTC (rev 55353)
+++ scummvm/trunk/engines/gob/videoplayer.cpp	2011-01-20 15:29:32 UTC (rev 55354)
@@ -74,7 +74,7 @@
 		_videoSlots[i].close();
 }
 
-void VideoPlayer::evaluateFlags(Properties &properties) {
+void VideoPlayer::evaluateFlags(Properties &properties, bool allowNonBlock) {
 	if        (properties.flags & kFlagFrontSurface) {
 		properties.sprite = Draw::kFrontSurface;
 	} else if (properties.flags & kFlagOtherSurface) {
@@ -87,6 +87,14 @@
 	} else {
 		properties.sprite = Draw::kBackSurface;
 	}
+
+	if (allowNonBlock) {
+		if(!(properties.flags & 0x1000) && !(properties.flags & kFlagNoVideo))
+			properties.flags |= kFlagNonBlocking;
+		else
+			properties.flags &= ~0x1000;
+	} else
+			properties.flags &= ~0x1000;
 }
 
 int VideoPlayer::openVideo(bool primary, const Common::String &file, Properties &properties) {

Modified: scummvm/trunk/engines/gob/videoplayer.h
===================================================================
--- scummvm/trunk/engines/gob/videoplayer.h	2011-01-20 12:40:42 UTC (rev 55353)
+++ scummvm/trunk/engines/gob/videoplayer.h	2011-01-20 15:29:32 UTC (rev 55354)
@@ -102,7 +102,7 @@
 	VideoPlayer(GobEngine *vm);
 	~VideoPlayer();
 
-	void evaluateFlags(Properties &properties);
+	void evaluateFlags(Properties &properties, bool allowNonBlock = false);
 
 	int  openVideo(bool primary, const Common::String &file, Properties &properties);
 	bool closeVideo(int slot = 0);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list