diff options
Diffstat (limited to 'video/out/vo_wlshm.c')
-rw-r--r-- | video/out/vo_wlshm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/video/out/vo_wlshm.c b/video/out/vo_wlshm.c index a71f9507fc..508da4261f 100644 --- a/video/out/vo_wlshm.c +++ b/video/out/vo_wlshm.c @@ -218,11 +218,14 @@ 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->hidden) - return; + if (!wl->opts->disable_vsync) + callback = vo_wayland_wait_frame(wl); wl->frame_wait = true; + if (!callback) + return; buf = p->free_buffers; if (buf) { @@ -274,9 +277,6 @@ 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); } |