Fixed bug 2024 - Update OSX Joystick code to fully support Saitek p2500 gamepad
Patrick Maloney Saitek p2500 (Cyborg Rumble Force Pad) has a D-pad, two analog sticks, and numerous buttons. SDL 2.x on OSX detected everything except the right-side analog stick. The right-side stick is considered a 'simulation device' with the axes mapped to throttle and rudder. The patch adds support for throttle and rudder on the HID simulation page.
This commit is contained in:
parent
42c560b05d
commit
e6e79353e8
1 changed files with 16 additions and 0 deletions
|
@ -362,6 +362,22 @@ HIDAddElement(CFTypeRef refElement, recDevice * pDevice)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case kHIDPage_Simulation:
|
||||||
|
switch (usage) {
|
||||||
|
case kHIDUsage_Sim_Rudder:
|
||||||
|
case kHIDUsage_Sim_Throttle:
|
||||||
|
element = (recElement *)
|
||||||
|
NewPtrClear(sizeof(recElement));
|
||||||
|
if (element) {
|
||||||
|
pDevice->axes++;
|
||||||
|
headElement = &(pDevice->firstAxis);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case kHIDPage_Button:
|
case kHIDPage_Button:
|
||||||
element = (recElement *)
|
element = (recElement *)
|
||||||
NewPtrClear(sizeof(recElement));
|
NewPtrClear(sizeof(recElement));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue