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

This commit is contained in:
Aric Stewart 2009-03-10 14:59:49 -05:00 committed by Alexandre Julliard
parent ffbd6a79a4
commit 17daca7648

View File

@ -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;
}