summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-05-30 17:44:36 -0500
committerDudemanguy <random342@airmail.cc>2022-05-30 20:28:16 -0500
commitf235bfbf361bbfb8e3972d0d8db30031ac664799 (patch)
tree8a08523548db39cbb61d8fd938998fc06534d47d /video/out
parent1ff2153245c844e3b09cc18ea8fd355ff646d0f3 (diff)
downloadmpv-f235bfbf361bbfb8e3972d0d8db30031ac664799.tar.bz2
mpv-f235bfbf361bbfb8e3972d0d8db30031ac664799.tar.xz
wayland: force vo_vaapi_wayland scaling to 1
The wayland stuff is designed to update/rescale itself whenever the wl_output scale changes. This is great, but vo_vaapi_wayland should not actually attempt to handle any hidpi stuff. The point of this VO is to hand off as much to the compositor as possible, so we do want the compositor to do the scaling here (enjoy your bilinear). This fixes some incorrect rendering that could occur with scaling values not equal 1 due to mismatches between buffer coordinates and the surface local coordinates. It also eliminates the need to specify --no-hidpi-window-scale on hidpi displays (has the same practical effect).
Diffstat (limited to 'video/out')
-rw-r--r--video/out/wayland_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index 282fefefef..1c8d2097c8 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -1492,8 +1492,9 @@ static int set_screensaver_inhibitor(struct vo_wayland_state *wl, int state)
static void set_surface_scaling(struct vo_wayland_state *wl)
{
+ bool vaapi_wayland = !strcmp(wl->vo->driver->name, "vaapi-wayland");
int old_scale = wl->scaling;
- if (wl->vo_opts->hidpi_window_scale) {
+ if (wl->vo_opts->hidpi_window_scale && !vaapi_wayland) {
wl->scaling = wl->current_output->scale;
} else {
wl->scaling = 1;