[Scummvm-cvs-logs] SF.net SVN: scummvm: [22758] scummvm/trunk/engines/cine/main_loop.cpp

joostp at users.sourceforge.net joostp at users.sourceforge.net
Mon May 29 16:26:04 CEST 2006


Revision: 22758
Author:   joostp
Date:     2006-05-29 16:25:50 -0700 (Mon, 29 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22758&view=rev

Log Message:
-----------
Only call OSystem::updateScreen() every other frame, so no more than 50 times per second.
This doesn't appear to make a visible difference on PC, but allows the game to run on PSP and probably several other consoles/ports that wait for 50/60hz vsync.
Since I'm not familiar with this engine I've added a 'FIXME' comment, because maybe this can be fixed/improved in a different manner.

Modified Paths:
--------------
    scummvm/trunk/engines/cine/main_loop.cpp
Modified: scummvm/trunk/engines/cine/main_loop.cpp
===================================================================
--- scummvm/trunk/engines/cine/main_loop.cpp	2006-05-29 21:30:48 UTC (rev 22757)
+++ scummvm/trunk/engines/cine/main_loop.cpp	2006-05-29 23:25:50 UTC (rev 22758)
@@ -127,7 +127,13 @@
 	int i;
 
 	for (i = 0; i < count; i++) {
-		g_system->updateScreen();
+		//FIXME(?): Maybe there's a better way to "fix" this?
+		//
+		//Since not all backends/ports can update the screen 
+		//100 times per second, only update the screen every
+		//other frame (1000 / 2 * 10 i.e. 50 times per second max.)
+		if (i % 2)
+			g_system->updateScreen();
 		g_system->delayMillis(10);
 		manageEvents(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