mirror of
https://github.com/mpv-player/mpv
synced 2025-02-17 04:58:06 +00:00
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
This commit is contained in:
parent
3fd8eb3f8e
commit
51cd2b0394
@ -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) )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user