changeset 24953:aca7d0259d90

Fix the prevent system idle code. Original code also works, but not as expected. The update function was always called, but it should only be called every 30 seconds.
author ulion
date Tue, 06 Nov 2007 12:40:04 +0000
parents 70b6cb8bbfd8
children a4cf3ff9b70e
files libvo/vo_macosx.m
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_macosx.m	Tue Nov 06 12:12:48 2007 +0000
+++ b/libvo/vo_macosx.m	Tue Nov 06 12:40:04 2007 +0000
@@ -664,7 +664,7 @@
 - (void) render
 {
 	int curTime;
-	static int lastTime;
+	static int lastTime = 0;
 
 	glClear(GL_COLOR_BUFFER_BIT);	
 	
@@ -722,7 +722,6 @@
 	//update activity every 30 seconds to prevent
 	//screensaver from starting up.
 	curTime  = TickCount()/60;
-	lastTime = 0;
 		
 	if( ((curTime - lastTime) >= 30) || (lastTime == 0) )
 	{