diff options
author | wm4 <wm4@nowhere> | 2015-10-02 17:49:22 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-10-02 17:59:05 +0200 |
commit | 69bc7e34b9ce6a8be6731a42a00a01a120194a41 (patch) | |
tree | 11ee6d51906e109baf755bdc6636a17544746fb0 /video/out/vo_opengl.c | |
parent | a9ed9e329c6e85d6d3336626106a67b9dd6a4bff (diff) | |
download | mpv-69bc7e34b9ce6a8be6731a42a00a01a120194a41.tar.bz2 mpv-69bc7e34b9ce6a8be6731a42a00a01a120194a41.tar.xz |
vo_opengl: refactor DwmFlush crap
Get it out of the way in the common code. MPGLContext.dwm_flush_opt can
be removed as well as soon as the option system gets overhauled.
Diffstat (limited to 'video/out/vo_opengl.c')
-rw-r--r-- | video/out/vo_opengl.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 2522c2e5c8..e547bd6346 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -71,7 +71,6 @@ struct gl_priv { int use_gl_debug; int allow_sw; int swap_interval; - int current_swap_interval; int dwm_flush; char *backend; @@ -148,12 +147,6 @@ static void flip_page(struct vo *vo) p->opt_pattern[0] = 0; } } - - if (p->glctx->DwmFlush) { - p->current_swap_interval = p->glctx->DwmFlush(p->glctx, p->dwm_flush, - p->swap_interval, - p->current_swap_interval); - } } static void draw_frame(struct vo *vo, struct vo_frame *frame) @@ -402,12 +395,13 @@ static int preinit(struct vo *vo) goto err_out; p->gl = p->glctx->gl; + p->glctx->dwm_flush_opt = p->dwm_flush; + if (p->gl->SwapInterval) { p->gl->SwapInterval(p->swap_interval); } else { MP_VERBOSE(vo, "swap_control extension missing.\n"); } - p->current_swap_interval = p->swap_interval; p->renderer = gl_video_init(p->gl, vo->log, vo->global); if (!p->renderer) |