summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-06 12:40:04 +0000
committerulion <ulion@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-11-06 12:40:04 +0000
commit51cd2b0394b638f75d416cbc68618db5eacfe940 (patch)
treed6af4cf7addb61b536a8ef7c0201b4cf6e746b44 /libvo
parent3fd8eb3f8e54d9fdd67544b031f7e034ecc318d0 (diff)
downloadmpv-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')
-rw-r--r--libvo/vo_macosx.m3
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) )
{