diff options
Diffstat (limited to 'video/out/vulkan')
-rw-r--r-- | video/out/vulkan/context.c | 9 | ||||
-rw-r--r-- | video/out/vulkan/context_wayland.c | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/video/out/vulkan/context.c b/video/out/vulkan/context.c index ea546519ec..3a8f58e4c4 100644 --- a/video/out/vulkan/context.c +++ b/video/out/vulkan/context.c @@ -246,9 +246,18 @@ static void swap_buffers(struct ra_swapchain *sw) p->params.swap_buffers(sw->ctx); } +static void get_vsync(struct ra_swapchain *sw, + struct vo_vsync_info *info) +{ + struct priv *p = sw->priv; + if (p->params.get_vsync) + p->params.get_vsync(sw->ctx, info); +} + static const struct ra_swapchain_fns vulkan_swapchain = { .color_depth = color_depth, .start_frame = start_frame, .submit_frame = submit_frame, .swap_buffers = swap_buffers, + .get_vsync = get_vsync, }; diff --git a/video/out/vulkan/context_wayland.c b/video/out/vulkan/context_wayland.c index 6abec91aaf..a9540411db 100644 --- a/video/out/vulkan/context_wayland.c +++ b/video/out/vulkan/context_wayland.c @@ -122,7 +122,7 @@ static void wayland_vk_swap_buffers(struct ra_ctx *ctx) static void wayland_vk_get_vsync(struct ra_ctx *ctx, struct vo_vsync_info *info) { struct vo_wayland_state *wl = ctx->vo->wl; - if (wl->presentation) { + if (wl->presentation && !wl->hidden) { info->vsync_duration = wl->vsync_duration; info->skipped_vsyncs = wl->last_skipped_vsyncs; info->last_queue_display_time = wl->last_queue_display_time; |