[Mac] Map GamePads, MultiAxisControllers and Wheels to joysticks
This commit is contained in:
parent
a1123834a0
commit
fda2d32d2d
1 changed files with 11 additions and 2 deletions
|
@ -165,8 +165,17 @@ namespace OpenTK.Platform.MacOS
|
|||
recognized = true;
|
||||
}
|
||||
|
||||
if (NativeMethods.IOHIDDeviceConformsTo(device,
|
||||
HIDPage.GenericDesktop, (int)HIDUsageGD.Joystick))
|
||||
bool is_joystick = false;
|
||||
is_joystick |= NativeMethods.IOHIDDeviceConformsTo(device,
|
||||
HIDPage.GenericDesktop, (int)HIDUsageGD.Joystick);
|
||||
is_joystick |= NativeMethods.IOHIDDeviceConformsTo(device,
|
||||
HIDPage.GenericDesktop, (int)HIDUsageGD.GamePad);
|
||||
is_joystick |= NativeMethods.IOHIDDeviceConformsTo(device,
|
||||
HIDPage.GenericDesktop, (int)HIDUsageGD.MultiAxisController);
|
||||
is_joystick |= NativeMethods.IOHIDDeviceConformsTo(device,
|
||||
HIDPage.GenericDesktop, (int)HIDUsageGD.Wheel);
|
||||
// Todo: any other interesting devices under HIDPage.Simulation + HIDUsageSim?
|
||||
if (is_joystick)
|
||||
{
|
||||
AddJoystick(sender, device);
|
||||
recognized = true;
|
||||
|
|
Loading…
Reference in a new issue