Wintab32 (Patch 7 of 8) -- Expose more XInput events through the wintab api.

Robert North 7ownq0k402 at sneakemail.com
Fri Jan 21 12:56:10 CST 2005


This set of patches works towards better quality painting in Painter5.
Tested on Painter5 & Photoshop 6.

Changelog:

*Add the rule that inverted cursor has -ve altitude, matching behaviour 
on Windows wacom tablets.



-------------- next part --------------
Index: dlls/x11drv/wintab.c
===================================================================
--- dlls/x11drv/wintab.c	(revision 159)
+++ dlls/x11drv/wintab.c	(revision 160)
@@ -608,8 +608,11 @@
         gMsgPacket.pkY = motion->axis_data[1];
         gMsgPacket.pkOrientation.orAzimuth =
                     figure_deg(motion->axis_data[3],motion->axis_data[4]);
-        gMsgPacket.pkOrientation.orAltitude = 1000 - 15 * max
-                    (abs(motion->axis_data[3]),abs(motion->axis_data[4]));
+        gMsgPacket.pkOrientation.orAltitude = 
+                    (1000 - 15 * max
+                        (abs(motion->axis_data[3]),
+                        abs(motion->axis_data[4]))
+                        )*(gMsgPacket.pkStatus & TPS_INVERT?-1:1);
         gMsgPacket.pkNormalPressure = motion->axis_data[2];
         gMsgPacket.pkButtons = get_button_state(motion->deviceid);
         SendMessageW(hwndTabletDefault,WT_PACKET,0,(LPARAM)hwnd);
@@ -634,8 +637,11 @@
         gMsgPacket.pkY = button->axis_data[1];
         gMsgPacket.pkOrientation.orAzimuth =
                     figure_deg(button->axis_data[3],button->axis_data[4]);
-        gMsgPacket.pkOrientation.orAltitude = 1000 - 15 * max
-                    (abs(button->axis_data[3]),abs(button->axis_data[4]));
+        gMsgPacket.pkOrientation.orAltitude =
+                    (1000 - 15 * max
+                        (abs(button->axis_data[3]),
+                        abs(button->axis_data[4]))
+                        )*(gMsgPacket.pkStatus & TPS_INVERT?-1:1);
         gMsgPacket.pkNormalPressure = button->axis_data[2];
         gMsgPacket.pkButtons = get_button_state(button->deviceid);
         SendMessageW(hwndTabletDefault,WT_PACKET,0,(LPARAM)hwnd);
@@ -668,8 +674,11 @@
         gMsgPacket.pkY = proximity->axis_data[1];
         gMsgPacket.pkOrientation.orAzimuth =
                     figure_deg(proximity->axis_data[3],proximity->axis_data[4]);
-        gMsgPacket.pkOrientation.orAltitude = 1000 - 15 * max
-                    (abs(proximity->axis_data[3]),abs(proximity->axis_data[4]));
+        gMsgPacket.pkOrientation.orAltitude =
+                    (1000 - 15 * max
+                        (abs(proximity->axis_data[3]),
+                        abs(proximity->axis_data[4]))
+                        )*(gMsgPacket.pkStatus & TPS_INVERT?-1:1);
         gMsgPacket.pkNormalPressure = proximity->axis_data[2];
         gMsgPacket.pkButtons = get_button_state(proximity->deviceid);
 


More information about the wine-patches mailing list