summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/context_wayland.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c
index 27a9aab32a..eeaeb11cc1 100644
--- a/video/out/opengl/context_wayland.c
+++ b/video/out/opengl/context_wayland.c
@@ -63,12 +63,9 @@ static bool wayland_egl_start_frame(struct ra_swapchain *sw, struct ra_fbo *out_
{
struct ra_ctx *ctx = sw->ctx;
struct vo_wayland_state *wl = ctx->vo->wl;
- bool render = true;
-
- if (!wl->opts->disable_vsync)
- render = vo_wayland_wait_frame(wl);
-
+ bool render = wl->render || wl->opts->disable_vsync;
wl->frame_wait = true;
+
return render ? ra_gl_ctx_start_frame(sw, out_fbo) : false;
}
@@ -80,6 +77,9 @@ static void wayland_egl_swap_buffers(struct ra_swapchain *sw)
eglSwapBuffers(p->egl_display, p->egl_surface);
+ if (!wl->opts->disable_vsync)
+ vo_wayland_wait_frame(wl);
+
if (wl->presentation)
wayland_sync_swap(wl);
}