Skip to content

Commit

Permalink
Fixed bug 2025 - Update 1.2 OSX Joystick code to fully support Saitek…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
slouken committed Aug 10, 2013
1 parent 7f26604 commit ca52ed5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -340,6 +340,22 @@ static void HIDAddElement (CFTypeRef refElement, recDevice* pDevice)
headElement = &(pDevice->firstButton);
}
break;
case kHIDPage_Simulation:
{
switch (usage) /* look at usage to determine function */
{
case kHIDUsage_Sim_Rudder:
case kHIDUsage_Sim_Throttle:
element = (recElement *) NewPtrClear (sizeof (recElement));
if (element)
{
pDevice->axes++;
headElement = &(pDevice->firstAxis);
}
break;
}
}
break;
default:
break;
}
Expand Down

0 comments on commit ca52ed5

Please sign in to comment.