summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authornplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-07 01:36:32 +0000
committernplourde <nplourde@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-02-07 01:36:32 +0000
commitfa6ba9c127a9066a6bae37612c5e5d1c376c353b (patch)
tree622a5de948fef56b67c3f557ba30ef0473ecd4d6 /libvo
parent312bff797795d897a2520268b4cdd937f3489414 (diff)
downloadmpv-fa6ba9c127a9066a6bae37612c5e5d1c376c353b.tar.bz2
mpv-fa6ba9c127a9066a6bae37612c5e5d1c376c353b.tar.xz
let osx sleep if video is paused
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17547 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/vo_macosx.m30
-rw-r--r--libvo/vo_quartz.c30
2 files changed, 30 insertions, 30 deletions
diff --git a/libvo/vo_macosx.m b/libvo/vo_macosx.m
index 3b4efef321..86136beedc 100644
--- a/libvo/vo_macosx.m
+++ b/libvo/vo_macosx.m
@@ -722,6 +722,21 @@ static int control(uint32_t request, void *data, ...)
lastTime = curTime;
}
}
+
+ //update activity every 60 seconds to prevent
+ //screensaver from starting up.
+ DateTimeRec d;
+ unsigned long curTime;
+ static unsigned long lastTime = 0;
+
+ GetTime(&d);
+ DateToSeconds( &d, &curTime);
+
+ if( ( (curTime - lastTime) >= 60) || (lastTime == 0))
+ {
+ UpdateSystemActivity(UsrActivity);
+ lastTime = curTime;
+ }
}
/*
@@ -849,21 +864,6 @@ static int control(uint32_t request, void *data, ...)
{
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate dateWithTimeIntervalSinceNow:0.0001] inMode:NSEventTrackingRunLoopMode dequeue:YES];
[NSApp sendEvent:event];
-
- //update activity every 60 seconds to prevent
- //screensaver from starting up.
- DateTimeRec d;
- unsigned long curTime;
- static unsigned long lastTime = 0;
-
- GetTime(&d);
- DateToSeconds( &d, &curTime);
-
- if( ( (curTime - lastTime) >= 60) || (lastTime == 0))
- {
- UpdateSystemActivity(UsrActivity);
- lastTime = curTime;
- }
}
/*
diff --git a/libvo/vo_quartz.c b/libvo/vo_quartz.c
index 4bc8558e63..b0d0497461 100644
--- a/libvo/vo_quartz.c
+++ b/libvo/vo_quartz.c
@@ -888,21 +888,6 @@ static void check_events(void)
SendEventToEventTarget (theEvent, theTarget);
ReleaseEvent(theEvent);
}
-
- //update activity every 30 seconds to prevent
- //screensaver from starting up.
- DateTimeRec d;
- unsigned long curTime;
- static unsigned long lastTime = 0;
-
- GetTime(&d);
- DateToSeconds( &d, &curTime);
-
- if( ( (curTime - lastTime) >= 30) || (lastTime == 0))
- {
- UpdateSystemActivity(UsrActivity);
- lastTime = curTime;
- }
}
static void draw_osd(void)
@@ -996,6 +981,21 @@ static void flip_page(void)
lastTime = curTime;
}
}
+
+ //update activity every 30 seconds to prevent
+ //screensaver from starting up.
+ DateTimeRec d;
+ unsigned long curTime;
+ static unsigned long lastTime = 0;
+
+ GetTime(&d);
+ DateToSeconds( &d, &curTime);
+
+ if( ( (curTime - lastTime) >= 30) || (lastTime == 0))
+ {
+ UpdateSystemActivity(UsrActivity);
+ lastTime = curTime;
+ }
}
static int draw_slice(uint8_t *src[], int stride[], int w,int h,int x,int y)