diff options
author | Dudemanguy911 <random342@airmail.cc> | 2019-10-20 12:46:42 -0500 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2019-10-20 19:50:10 +0000 |
commit | 9dead2b932e13be6e25cdff20294fbb9e616d69c (patch) | |
tree | 063608c335b43ef430877bb7e647ca1beff71500 /video/out/opengl | |
parent | 525e712757c8cc5c61f3eeb23234f9264fcb8a2c (diff) | |
download | mpv-9dead2b932e13be6e25cdff20294fbb9e616d69c.tar.bz2 mpv-9dead2b932e13be6e25cdff20294fbb9e616d69c.tar.xz |
wayland: fix presentation time
There's 2 stupid things here that need to be fixed. First of all,
vulkan wasn't actually using presentation time because somehow the
get_vsync function in context.c disappeared. Secondly, if the mpv window
was hidden it was updating the ust time based on the refresh_usec but
really it should simply just not feed any information to the vsync info
structure. So this adds some logic to assume whether or not a window is
hidden.
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context_wayland.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/video/out/opengl/context_wayland.c b/video/out/opengl/context_wayland.c index 917db8553c..ea31f6337c 100644 --- a/video/out/opengl/context_wayland.c +++ b/video/out/opengl/context_wayland.c @@ -151,7 +151,7 @@ static void wayland_egl_swap_buffers(struct ra_ctx *ctx) static void wayland_egl_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; |