diff options
author | wm4 <wm4@nowhere> | 2018-08-31 20:08:08 +0200 |
---|---|---|
committer | Anton Kindestam <antonki@kth.se> | 2018-12-06 10:30:25 +0100 |
commit | b1ba7de34dd5685a082454817f23509d1c28e4aa (patch) | |
tree | dc7c077d64742cb728c88fc582f952718a61155d /video/out/opengl/context.c | |
parent | 83884fdf03fc991679bea53d3d5bddf97ed16a9b (diff) | |
download | mpv-b1ba7de34dd5685a082454817f23509d1c28e4aa.tar.bz2 mpv-b1ba7de34dd5685a082454817f23509d1c28e4aa.tar.xz |
vo: use a struct for vsync feedback stuff
So new useless stuff can be easily added.
Diffstat (limited to 'video/out/opengl/context.c')
-rw-r--r-- | video/out/opengl/context.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c index 44e64b7d9a..9b3dd6a827 100644 --- a/video/out/opengl/context.c +++ b/video/out/opengl/context.c @@ -313,10 +313,12 @@ void ra_gl_ctx_swap_buffers(struct ra_swapchain *sw) } } -static double ra_gl_ctx_get_latency(struct ra_swapchain *sw) +static void ra_gl_ctx_get_vsync(struct ra_swapchain *sw, + struct vo_vsync_info *info) { struct priv *p = sw->priv; - return p->params.get_latency ? p->params.get_latency(sw->ctx) : -1; + if (p->params.get_vsync) + p->params.get_vsync(sw->ctx, info); } static const struct ra_swapchain_fns ra_gl_swapchain_fns = { @@ -324,5 +326,5 @@ static const struct ra_swapchain_fns ra_gl_swapchain_fns = { .start_frame = ra_gl_ctx_start_frame, .submit_frame = ra_gl_ctx_submit_frame, .swap_buffers = ra_gl_ctx_swap_buffers, - .get_latency = ra_gl_ctx_get_latency, + .get_vsync = ra_gl_ctx_get_vsync, }; |