mirror of https://github.com/mpv-player/mpv
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@24982 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
51cd2b0394
commit
ac78bc4eca
|
@ -898,7 +898,7 @@ static void draw_osd(void)
|
|||
static void flip_page(void)
|
||||
{
|
||||
int curTime;
|
||||
static int lastTime;
|
||||
static int lastTime = 0;
|
||||
|
||||
if(theWindow == NULL)
|
||||
return;
|
||||
|
@ -984,9 +984,8 @@ static void flip_page(void)
|
|||
//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;
|
||||
|
|
Loading…
Reference in New Issue