[MPlayer-cvslog] r24982 - trunk/libvo/vo_quartz.c
ulion
subversion at mplayerhq.hu
Tue Nov 6 13:52:54 CET 2007
Author: ulion
Date: Tue Nov 6 13:52:54 2007
New Revision: 24982
Log:
Fix the prevent system idle code. Original code also works, but not as expected.
The update function was called whenever, it should be once per 30 seconds.
Modified:
trunk/libvo/vo_quartz.c
Modified: trunk/libvo/vo_quartz.c
==============================================================================
--- trunk/libvo/vo_quartz.c (original)
+++ trunk/libvo/vo_quartz.c Tue Nov 6 13:52:54 2007
@@ -898,7 +898,7 @@ static void draw_osd(void)
static void flip_page(void)
{
int curTime;
- static int lastTime;
+ static int lastTime = 0;
if(theWindow == NULL)
return;
@@ -984,9 +984,8 @@ static void flip_page(void)
//update activity every 30 seconds to prevent
//screensaver from starting up.
curTime = TickCount()/60;
- lastTime = 0;
- if( ((curTime/ - lastTime) >= 5) || (lastTime == 0) )
+ if( ((curTime - lastTime) >= 30) || (lastTime == 0) )
{
UpdateSystemActivity(UsrActivity);
lastTime = curTime;
More information about the MPlayer-cvslog
mailing list