summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/context_glx.c9
-rw-r--r--video/out/opengl/context_x11egl.c9
2 files changed, 12 insertions, 6 deletions
diff --git a/video/out/opengl/context_glx.c b/video/out/opengl/context_glx.c
index affe7c0f27..5ff6038ce7 100644
--- a/video/out/opengl/context_glx.c
+++ b/video/out/opengl/context_glx.c
@@ -206,14 +206,17 @@ static bool glx_check_visible(struct ra_ctx *ctx)
static void glx_swap_buffers(struct ra_ctx *ctx)
{
glXSwapBuffers(ctx->vo->x11->display, ctx->vo->x11->window);
- vo_x11_present(ctx->vo);
- present_sync_swap(ctx->vo->x11->present);
+ if (ctx->vo->x11->use_present) {
+ vo_x11_present(ctx->vo);
+ present_sync_swap(ctx->vo->x11->present);
+ }
}
static void glx_get_vsync(struct ra_ctx *ctx, struct vo_vsync_info *info)
{
struct vo_x11_state *x11 = ctx->vo->x11;
- present_sync_get_info(x11->present, info);
+ if (ctx->vo->x11->use_present)
+ present_sync_get_info(x11->present, info);
}
static bool glx_init(struct ra_ctx *ctx)
diff --git a/video/out/opengl/context_x11egl.c b/video/out/opengl/context_x11egl.c
index 549498b435..39df64f5e5 100644
--- a/video/out/opengl/context_x11egl.c
+++ b/video/out/opengl/context_x11egl.c
@@ -82,14 +82,17 @@ static void mpegl_swap_buffers(struct ra_ctx *ctx)
struct priv *p = ctx->priv;
eglSwapBuffers(p->egl_display, p->egl_surface);
- vo_x11_present(ctx->vo);
- present_sync_swap(ctx->vo->x11->present);
+ if (ctx->vo->x11->use_present) {
+ vo_x11_present(ctx->vo);
+ present_sync_swap(ctx->vo->x11->present);
+ }
}
static void mpegl_get_vsync(struct ra_ctx *ctx, struct vo_vsync_info *info)
{
struct vo_x11_state *x11 = ctx->vo->x11;
- present_sync_get_info(x11->present, info);
+ if (ctx->vo->x11->use_present)
+ present_sync_get_info(x11->present, info);
}
static bool mpegl_init(struct ra_ctx *ctx)