mirror of https://github.com/mpv-player/mpv
cocoa: fix scroll wheel input with Shift modifier
holding shift swaps the scroll wheel axes and deltaY returned zero. summing up deltaX and deltaY will always give us the right button. Fixes #3506
This commit is contained in:
parent
f9369750b1
commit
3064bbe1dd
|
@ -266,7 +266,8 @@
|
|||
[self preciseScroll:event];
|
||||
} else {
|
||||
const int modifiers = [event modifierFlags];
|
||||
const int mpkey = [event deltaY] > 0 ? MP_MOUSE_BTN3 : MP_MOUSE_BTN4;
|
||||
const int mpkey = ([event deltaX] + [event deltaY]) > 0 ?
|
||||
MP_MOUSE_BTN3 : MP_MOUSE_BTN4;
|
||||
[self.adapter putKey:mpkey withModifiers:modifiers];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue