summaryrefslogtreecommitdiffstats
path: root/video/out/vo_wlshm.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_wlshm.c')
-rw-r--r--video/out/vo_wlshm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/vo_wlshm.c b/video/out/vo_wlshm.c
index 508da4261f..69cfdd9dcc 100644
--- a/video/out/vo_wlshm.c
+++ b/video/out/vo_wlshm.c
@@ -218,13 +218,10 @@ static void draw_image(struct vo *vo, struct mp_image *src)
struct priv *p = vo->priv;
struct vo_wayland_state *wl = vo->wl;
struct buffer *buf;
- bool callback = true;
-
- if (!wl->opts->disable_vsync)
- callback = vo_wayland_wait_frame(wl);
-
+ bool render = wl->render || wl->opts->disable_vsync;
wl->frame_wait = true;
- if (!callback)
+
+ if (!render)
return;
buf = p->free_buffers;
@@ -277,6 +274,9 @@ static void flip_page(struct vo *vo)
mp_rect_h(wl->geometry));
wl_surface_commit(wl->surface);
+ if (!wl->opts->disable_vsync)
+ vo_wayland_wait_frame(wl);
+
if (wl->presentation)
wayland_sync_swap(wl);
}