# HG changeset patch # User ulion # Date 1194352804 0 # Node ID aca7d0259d90c06d3c43de275c9d18a061d15f14 # Parent 70b6cb8bbfd8070de71e4917f4a7a1118fe5be9b 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 70b6cb8bbfd8 -r aca7d0259d90 libvo/vo_macosx.m --- 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) ) {