Aric Stewart : dinput: OS/X joystick add GD_X, GD_Y, GD_Z axes.
Alexandre Julliard
julliard at winehq.org
Wed Mar 11 10:04:36 CDT 2009
Module: wine
Branch: master
Commit: ffbd6a79a4032f01baf9cd56d2b54b8f1a7f37cc
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ffbd6a79a4032f01baf9cd56d2b54b8f1a7f37cc
Author: Aric Stewart <aric at codeweavers.com>
Date: Tue Mar 10 14:59:41 2009 -0500
dinput: OS/X joystick add GD_X, GD_Y, GD_Z axes.
---
dlls/dinput/joystick_osx.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/dlls/dinput/joystick_osx.c b/dlls/dinput/joystick_osx.c
index fb59ec5..709c4a7 100644
--- a/dlls/dinput/joystick_osx.c
+++ b/dlls/dinput/joystick_osx.c
@@ -343,6 +343,14 @@ static void get_osx_device_elements(JoystickImpl *device)
povs++;
break;
}
+ case kHIDUsage_GD_X:
+ case kHIDUsage_GD_Y:
+ case kHIDUsage_GD_Z:
+ {
+ CFArrayInsertValueAtIndex(device->elementCFArrayRef, axes, tIOHIDElementRef);
+ axes++;
+ break;
+ }
default:
FIXME("Unhandled usage %i\n",usage);
}
@@ -437,6 +445,26 @@ static void poll_osx_device_state(JoystickGenericImpl *device_in)
pov_idx ++;
break;
}
+ case kHIDUsage_GD_X:
+ case kHIDUsage_GD_Y:
+ case kHIDUsage_GD_Z:
+ {
+ IOHIDDeviceGetValue(tIOHIDDeviceRef, tIOHIDElementRef, &valueRef);
+ val = IOHIDValueGetIntegerValue(valueRef);
+ switch (usage)
+ {
+ case kHIDUsage_GD_X:
+ device->generic.js.lX = joystick_map_axis(&device->generic.props[idx], val);
+ break;
+ case kHIDUsage_GD_Y:
+ device->generic.js.lY = joystick_map_axis(&device->generic.props[idx], val);
+ break;
+ case kHIDUsage_GD_Z:
+ device->generic.js.lZ = joystick_map_axis(&device->generic.props[idx], val);
+ break;
+ }
+ break;
+ }
default:
FIXME("unhandled usage %i\n",usage);
}
More information about the wine-cvs
mailing list