Fix: Inverted tablet pen Y tilt on macOS
On macOS, the tablet pen Y tilt behavior is inverted; an increase in the
tilt value corresponds to tilting the device away from the user. Account
for this difference by negating the Y tilt axis in the Cocoa pen tablet
handling code.
Refs:
* 0f128fd7c5/src/plugins/platforms/cocoa/qnsview_tablet.mm (L63)
* https://source.chromium.org/chromium/chromium/src/+/main:components/input/web_input_event_builders_mac.mm;drc=0af5ffa1e4cc4cc4f818725f8fee93ec57855e4b;l=421
Pull Request: https://projects.blender.org/blender/blender/pulls/133932
This commit is contained in:
committed by
Jonas Holzman
parent
3a85ccde38
commit
c551d2a819
@@ -1478,7 +1478,9 @@ GHOST_TSuccess GHOST_SystemCocoa::handleTabletEvent(void *eventPtr, short eventT
|
||||
|
||||
ct.Pressure = event.pressure;
|
||||
ct.Xtilt = event.tilt.x;
|
||||
ct.Ytilt = event.tilt.y;
|
||||
/* On macOS, the y tilt behavior is inverted; an increase in the tilt
|
||||
* value corresponds to tilting the device away from the user. */
|
||||
ct.Ytilt = -event.tilt.y;
|
||||
break;
|
||||
|
||||
case NSEventTypeTabletProximity:
|
||||
|
||||
Reference in New Issue
Block a user