summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorder richter <der.richter@gmx.de>2023-11-20 16:17:47 +0100
committerder richter <der.richter@gmx.de>2023-11-20 23:16:43 +0100
commit947800ceb87512a00c86701d08e94ac30b2ca0b0 (patch)
tree6c655eab7c4fb3ce9f5da8ec3bb60728aa5d4fd0
parentbcdc5c40e71147fdacb7335471196cef3e917ec0 (diff)
downloadmpv-947800ceb87512a00c86701d08e94ac30b2ca0b0.tar.bz2
mpv-947800ceb87512a00c86701d08e94ac30b2ca0b0.tar.xz
mac: fix reporting of left wheel and right wheel scrolling
left wheel and right wheel was swapped. this was copied from the old cocoa backend. a delta <0 is a right scroll, >0 is a left scroll. Fixes #12899
-rw-r--r--video/out/mac/view.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/mac/view.swift b/video/out/mac/view.swift
index db5fc4aec2..c4776c3fba 100644
--- a/video/out/mac/view.swift
+++ b/video/out/mac/view.swift
@@ -224,7 +224,7 @@ class View: NSView {
cmd = delta > 0 ? SWIFT_WHEEL_UP : SWIFT_WHEEL_DOWN
} else {
delta = Double(event.deltaX) * 0.1
- cmd = delta > 0 ? SWIFT_WHEEL_RIGHT : SWIFT_WHEEL_LEFT
+ cmd = delta > 0 ? SWIFT_WHEEL_LEFT : SWIFT_WHEEL_RIGHT
}
mpv?.putAxis(cmd, delta: abs(delta))
@@ -246,7 +246,7 @@ class View: NSView {
if abs(deltaY) >= abs(deltaX) {
mpkey = deltaY > 0 ? SWIFT_WHEEL_UP : SWIFT_WHEEL_DOWN
} else {
- mpkey = deltaX > 0 ? SWIFT_WHEEL_RIGHT : SWIFT_WHEEL_LEFT
+ mpkey = deltaX > 0 ? SWIFT_WHEEL_LEFT : SWIFT_WHEEL_RIGHT
}
cocoa_put_key_with_modifiers(mpkey, Int32(modifiers.rawValue))