mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-03-08 10:10:00 +00:00
[Mac] Map GamePads, MultiAxisControllers and Wheels to joysticks
This commit is contained in:
parent
a1123834a0
commit
fda2d32d2d
|
@ -165,8 +165,17 @@ namespace OpenTK.Platform.MacOS
|
||||||
recognized = true;
|
recognized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NativeMethods.IOHIDDeviceConformsTo(device,
|
bool is_joystick = false;
|
||||||
HIDPage.GenericDesktop, (int)HIDUsageGD.Joystick))
|
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);
|
AddJoystick(sender, device);
|
||||||
recognized = true;
|
recognized = true;
|
||||||
|
|
Loading…
Reference in a new issue