Mercurial > mplayer.hg
changeset 24954:a4cf3ff9b70e
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:52:54 +0000 |
parents | aca7d0259d90 |
children | 28024b2c5f15 |
files | libvo/vo_quartz.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libvo/vo_quartz.c Tue Nov 06 12:40:04 2007 +0000 +++ b/libvo/vo_quartz.c Tue Nov 06 12:52:54 2007 +0000 @@ -898,7 +898,7 @@ static void flip_page(void) { int curTime; - static int lastTime; + static int lastTime = 0; if(theWindow == NULL) return; @@ -984,9 +984,8 @@ //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;