aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-06 12:52:54 +0000
committerGravatar ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-06 12:52:54 +0000
commitac78bc4eca2f1748685c1258d43e00e17afa4e4c (patch)
treea9dbd0539d71f5a030c65e0dbfb0679a33f4345d
parent51cd2b0394b638f75d416cbc68618db5eacfe940 (diff)
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. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24982 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--libvo/vo_quartz.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index d00767c201..1e1134f3c6 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -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;