From 1bfb1299857dea9b058ba6934529c6e62a59ea29 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 29 Jan 2024 21:02:36 +0000 Subject: [PATCH] backend: don't choose SGI_video_sync vblank if opengl is not enabled Signed-off-by: Yuxuan Shui --- src/backend/driver.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backend/driver.c b/src/backend/driver.c index f17743a4..a70384e1 100644 --- a/src/backend/driver.c +++ b/src/backend/driver.c @@ -20,10 +20,13 @@ void apply_driver_workarounds(struct session *ps, enum driver driver) { } enum vblank_scheduler_type choose_vblank_scheduler(enum driver driver) { + enum vblank_scheduler_type type = VBLANK_SCHEDULER_PRESENT; +#ifdef CONFIG_OPENGL if (driver & DRIVER_NVIDIA) { - return VBLANK_SCHEDULER_SGI_VIDEO_SYNC; + type = VBLANK_SCHEDULER_SGI_VIDEO_SYNC; } - return VBLANK_SCHEDULER_PRESENT; +#endif + return type; } enum driver detect_driver(xcb_connection_t *c, backend_t *backend_data, xcb_window_t window) {