From b1ba7de34dd5685a082454817f23509d1c28e4aa Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 31 Aug 2018 20:08:08 +0200 Subject: vo: use a struct for vsync feedback stuff So new useless stuff can be easily added. --- video/out/opengl/context.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'video/out/opengl/context.c') 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, }; -- cgit v1.2.3