Commit ffbd6a79 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

dinput: OS/X joystick add GD_X, GD_Y, GD_Z axes.

parent 87d61ab2
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment