summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShawn Rutledge <shawn.rutledge@digia.com>2014-07-28 15:06:43 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-07-31 12:20:22 +0200
commit6c1a12c5581ca8976d36431456ad53f04cddfd7d (patch)
tree9797d45810ab6b5a48d6863b9071ad5ae6343d8f /src
parentb5ce3d504c4cfe46725bfbcb4bfa37c7456a67c9 (diff)
OS X: correct tablet airbrush tangentialPressure to range -1..1
The driver sends values in the range 0..1, but we want the "center" value to be 0. This correction makes tangentialPressure consistent between Linux, Windows and OS X. Task-number: QTBUG-40469 Change-Id: Ia4aa777efdf015c2802b945f6ca7a8e442bbf5fc Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index cc8fe51e0f..66ef16d2b3 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -1001,7 +1001,7 @@ Q_GLOBAL_STATIC(QCocoaTabletDeviceDataHash, tabletDeviceDataHash)
z = [theEvent absoluteZ];
if (deviceData.capabilityMask & 0x0800)
- tangentialPressure = [theEvent tangentialPressure];
+ tangentialPressure = ([theEvent tangentialPressure] * 2.0) - 1.0;
rotation = [theEvent rotation];