diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-09-16 20:53:04 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-10-16 07:19:32 +0200 |
commit | f5de0aac96621b584bdb5fd1ca5916529d219b0a (patch) | |
tree | 84d02d43b99f6a330eb5295b00af32e10447c678 /libvo/vo_opengl.c | |
parent | b94619724327e555a348e2cdcd4c6d2ccde8f8b1 (diff) | |
download | mpv-f5de0aac96621b584bdb5fd1ca5916529d219b0a.tar.bz2 mpv-f5de0aac96621b584bdb5fd1ca5916529d219b0a.tar.xz |
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.
Diffstat (limited to 'libvo/vo_opengl.c')
-rw-r--r-- | libvo/vo_opengl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libvo/vo_opengl.c b/libvo/vo_opengl.c index b6f2ddd811..7f400ce62c 100644 --- a/libvo/vo_opengl.c +++ b/libvo/vo_opengl.c @@ -1941,6 +1941,16 @@ static int control(struct vo *vo, uint32_t request, void *data) break; p->glctx->ontop(vo); return VO_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_FULLSCREEN: p->glctx->fullscreen(vo); resize(p); |