# HG changeset patch # User ulion # Date 1194353574 0 # Node ID a4cf3ff9b70ef3bd1e1265ff0597161a8edd3ced # Parent aca7d0259d90c06d3c43de275c9d18a061d15f14 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. diff -r aca7d0259d90 -r a4cf3ff9b70e libvo/vo_quartz.c --- 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;