Aric Stewart : dinput: OS/X joystick add Rx,Ry,and Rz axes.

Alexandre Julliard julliard at winehq.org
Wed Mar 11 10:04:37 CDT 2009


Module: wine
Branch: master
Commit: 17daca7648daf29ccdf87955a44bd8c58cc5052a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=17daca7648daf29ccdf87955a44bd8c58cc5052a

Author: Aric Stewart <aric at codeweavers.com>
Date:   Tue Mar 10 14:59:49 2009 -0500

dinput: OS/X joystick add Rx,Ry,and Rz axes.

---

 dlls/dinput/joystick_osx.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index 709c4a7..e0213b6 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -346,6 +346,9 @@ static void get_osx_device_elements(JoystickImpl *device)
                         case kHIDUsage_GD_X:
                         case kHIDUsage_GD_Y:
                         case kHIDUsage_GD_Z:
+                        case kHIDUsage_GD_Rx:
+                        case kHIDUsage_GD_Ry:
+                        case kHIDUsage_GD_Rz:
                         {
                             CFArrayInsertValueAtIndex(device->elementCFArrayRef, axes, tIOHIDElementRef);
                             axes++;
@@ -448,6 +451,9 @@ static void poll_osx_device_state(JoystickGenericImpl *device_in)
                         case kHIDUsage_GD_X:
                         case kHIDUsage_GD_Y:
                         case kHIDUsage_GD_Z:
+                        case kHIDUsage_GD_Rx:
+                        case kHIDUsage_GD_Ry:
+                        case kHIDUsage_GD_Rz:
                         {
                             IOHIDDeviceGetValue(tIOHIDDeviceRef, tIOHIDElementRef, &valueRef);
                             val = IOHIDValueGetIntegerValue(valueRef);
@@ -462,6 +468,15 @@ static void poll_osx_device_state(JoystickGenericImpl *device_in)
                             case kHIDUsage_GD_Z:
                                 device->generic.js.lZ = joystick_map_axis(&device->generic.props[idx], val);
                                 break;
+                            case kHIDUsage_GD_Rx:
+                                device->generic.js.lRx = joystick_map_axis(&device->generic.props[idx], val);
+                                break;
+                            case kHIDUsage_GD_Ry:
+                                device->generic.js.lRy = joystick_map_axis(&device->generic.props[idx], val);
+                                break;
+                            case kHIDUsage_GD_Rz:
+                                device->generic.js.lRz = joystick_map_axis(&device->generic.props[idx], val);
+                                break;
                             }
                             break;
                         }




More information about the wine-cvs mailing list