diff options
author | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-06 12:40:04 +0000 |
---|---|---|
committer | ulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-11-06 12:40:04 +0000 |
commit | 51cd2b0394b638f75d416cbc68618db5eacfe940 (patch) | |
tree | d6af4cf7addb61b536a8ef7c0201b4cf6e746b44 /libvo/vo_macosx.m | |
parent | 3fd8eb3f8e54d9fdd67544b031f7e034ecc318d0 (diff) | |
download | mpv-51cd2b0394b638f75d416cbc68618db5eacfe940.tar.bz2 mpv-51cd2b0394b638f75d416cbc68618db5eacfe940.tar.xz |
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@24981 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/vo_macosx.m')
-rw-r--r-- | libvo/vo_macosx.m | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m index f175403dfb..3f953bfad7 100644 --- a/libvo/vo_macosx.m +++ b/libvo/vo_macosx.m @@ -664,7 +664,7 @@ static int control(uint32_t request, void *data, ...) - (void) render { int curTime; - static int lastTime; + static int lastTime = 0; glClear(GL_COLOR_BUFFER_BIT); @@ -722,7 +722,6 @@ static int control(uint32_t request, void *data, ...) //update activity every 30 seconds to prevent //screensaver from starting up. curTime = TickCount()/60; - lastTime = 0; if( ((curTime - lastTime) >= 30) || (lastTime == 0) ) { |