diff options
author | wm4 <wm4@nowhere> | 2015-01-23 22:06:12 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-01-23 22:08:20 +0100 |
commit | 5e9f7916674c4640707727eac80c659290492bad (patch) | |
tree | 5a87d5893508384dcfaa11a35690b94b89d16e86 /video/out/vo_opengl.c | |
parent | 4a1a0e98d8f7ce8e1ab61ff740699cce9bb43f70 (diff) | |
download | mpv-5e9f7916674c4640707727eac80c659290492bad.tar.bz2 mpv-5e9f7916674c4640707727eac80c659290492bad.tar.xz |
video: separate screenshot modes
Use different VOCTRLs for "window" and normal screenshot modes. The
normal one will probably be removed, and replaced by generic code in
vo.c, and this commit is preparation for this. (Doing it the other way
around would be slightly simpler, but I haven't decided yet about the
second one, and touching every VO is needed anyway in order to remove
the unneeded crap. E.g. has_osd has been unused for a long time.)
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 6a2a48fb47..618ed90aff 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -348,13 +348,13 @@ static int control(struct vo *vo, uint32_t request, void *data) gl_video_get_colorspace(p->renderer, data); mpgl_unlock(p->glctx); return VO_TRUE; - case VOCTRL_SCREENSHOT: { - struct voctrl_screenshot_args *args = data; + case VOCTRL_SCREENSHOT_WIN: + case VOCTRL_SCREENSHOT: + { mpgl_lock(p->glctx); - if (args->full_window) - args->out_image = glGetWindowScreenshot(p->gl); - else - args->out_image = gl_video_download_image(p->renderer); + *(struct mp_image **)data = request == VOCTRL_SCREENSHOT + ? gl_video_download_image(p->renderer) + : glGetWindowScreenshot(p->gl); mpgl_unlock(p->glctx); return true; } |