From 4c99ecfde4b9215cc4c43d0ffe709da3ccfd0d23 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 9 Feb 2019 00:16:47 +0000 Subject: [PATCH] Fix compile without opengl Signed-off-by: Yuxuan Shui --- src/vsync.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vsync.c b/src/vsync.c index d872f7b6..5acf0830 100644 --- a/src/vsync.c +++ b/src/vsync.c @@ -229,8 +229,10 @@ void (*const VSYNC_FUNCS_DEINIT[NUM_VSYNC])(session_t *ps) = { */ bool vsync_init(session_t *ps) { // Mesa turns on swap control by default, undo that +#ifdef CONFIG_OPENGL if (bkend_use_glx(ps)) vsync_opengl_swc_swap_interval(ps, 0); +#endif if (ps->o.vsync && VSYNC_FUNCS_INIT[ps->o.vsync] && !VSYNC_FUNCS_INIT[ps->o.vsync](ps)) {