From f5de0aac96621b584bdb5fd1ca5916529d219b0a Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 16 Sep 2012 20:53:04 +0200 Subject: cocoa_common: use IOKit to perform power management This allows to remove the call to the deprecated `UpdateSystemActivity`. The additional benefit is power management is disabled only if the video is really playing. A paused video will not stop the system from idling. --- libvo/vo_opengl_old.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libvo/vo_opengl_old.c') diff --git a/libvo/vo_opengl_old.c b/libvo/vo_opengl_old.c index d3a9c0e170..d302504846 100644 --- a/libvo/vo_opengl_old.c +++ b/libvo/vo_opengl_old.c @@ -1442,6 +1442,16 @@ static int control(struct vo *vo, uint32_t request, void *data) if (vo_doublebuffering) do_render(vo); return true; + case VOCTRL_PAUSE: + if (!p->glctx->pause) + break; + p->glctx->pause(vo); + return VO_TRUE; + case VOCTRL_RESUME: + if (!p->glctx->resume) + break; + p->glctx->resume(vo); + return VO_TRUE; case VOCTRL_SCREENSHOT: { struct voctrl_screenshot_args *args = data; if (args->full_window) -- cgit v1.2.3