[Scummvm-cvs-logs] SF.net SVN: scummvm:[55137] scummvm/trunk/engines/sci/engine/kvideo.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jan 7 01:07:34 CET 2011


Revision: 55137
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55137&view=rev
Author:   thebluegr
Date:     2011-01-07 00:07:33 +0000 (Fri, 07 Jan 2011)

Log Message:
-----------
SCI2.1: Added a sanity check for VMD video positioning, for the demo of Lighthouse

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kvideo.cpp

Modified: scummvm/trunk/engines/sci/engine/kvideo.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kvideo.cpp	2011-01-07 00:05:14 UTC (rev 55136)
+++ scummvm/trunk/engines/sci/engine/kvideo.cpp	2011-01-07 00:07:33 UTC (rev 55137)
@@ -61,9 +61,17 @@
 
 	uint16 x, y; 
 
+	// Sanity check...
 	if (videoState.x > 0 && videoState.y > 0 && isVMD) {
 		x = videoState.x;
 		y = videoState.y;
+
+		if (x + width > screenWidth || y + height > screenHeight) {
+			// Happens in the Lighthouse demo
+			warning("VMD video won't fit on screen, centering it instead");
+			x = (screenWidth - width) / 2;
+			y = (screenHeight - height) / 2;
+		}
 	} else {
 		x = (screenWidth - width) / 2;
 		y = (screenHeight - height) / 2;


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