summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2024-04-08 14:02:57 -0500
committerDudemanguy <random342@airmail.cc>2024-04-09 13:48:08 +0000
commit0d250892ba667630c736dce6fc549182708a999f (patch)
tree75953361a72e7dd67af5c601ed54dc860d05e65e /video/out
parentd3941f235a73f0eb881919bafe208f63ad6a33d5 (diff)
downloadmpv-0d250892ba667630c736dce6fc549182708a999f.tar.bz2
mpv-0d250892ba667630c736dce6fc549182708a999f.tar.xz
Revert "vo_dmabuf_wayland: assume counter-clockwise rotations"
This commit was originally sparked by a change in sway. When looking at the wording of the spec, it was believed that the rotation should be counter-clockwise. But that was interpreted incorrectly. The rotation direction in the spec is meant for compositors not clients. Clients should be rotating clockwise and compositors rotate it the opposite direction. Also see the discussion in upstream wayland*. *: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/369 This reverts commit 27ef1725e7724f4b6899e3992ac3a884db9fbe13.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_dmabuf_wayland.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/video/out/vo_dmabuf_wayland.c b/video/out/vo_dmabuf_wayland.c
index a241ef1763..35a4dac464 100644
--- a/video/out/vo_dmabuf_wayland.c
+++ b/video/out/vo_dmabuf_wayland.c
@@ -695,10 +695,7 @@ done:
if (!vo_wayland_reconfig(vo))
return VO_ERROR;
- // mpv rotates clockwise but the wayland spec has counter-clockwise rotations
- // swap 1 and 3 to match mpv's direction
- int transform = (360 - img->params.rotate) % 360 / 90;
- wl_surface_set_buffer_transform(vo->wl->video_surface, transform);
+ wl_surface_set_buffer_transform(vo->wl->video_surface, img->params.rotate / 90);
// Immediately destroy all buffers if params change.
destroy_buffers(vo);