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

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jan 1 18:16:13 CET 2010


Revision: 46839
          http://scummvm.svn.sourceforge.net/scummvm/?rev=46839&view=rev
Author:   thebluegr
Date:     2010-01-01 17:16:12 +0000 (Fri, 01 Jan 2010)

Log Message:
-----------
Fixed KQ5CD (regression from rev. 46656)

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

Modified: scummvm/trunk/engines/sci/engine/kmisc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-01-01 16:57:23 UTC (rev 46838)
+++ scummvm/trunk/engines/sci/engine/kmisc.cpp	2010-01-01 17:16:12 UTC (rev 46839)
@@ -252,11 +252,19 @@
 };
 
 reg_t kPlatform(EngineState *s, int argc, reg_t *argv) {
+	if (argc == 0) {
+		// This is called in KQ5CD with no parameters, where
+		// it seems to do some graphics driver check. This
+		// kernel function didn't have subfunctions then.
+		// If 0 is returned, the game functions normally,
+		// otherwise all the animations show up like a
+		// slideshow (e.g. in the intro). So we return 0 :)
+		return NULL_REG;
+	}
+
 	bool isWindows = ((SciEngine*)g_engine)->getPlatform() == Common::kPlatformWindows;
+	uint16 operation = argv[0].toUint16();
 
-	// No arguments is the same as operation 0
-	uint16 operation = (argc == 1) ? argv[0].toUint16() : 0;
-
 	switch (operation) {
 	case kPlatformUnk0:
 		return make_reg(0, !isWindows);


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