Mac: expose joystick buttons that report themselves as having 'Start' and 'Select' HID usages.
authorAlex Szpakowski <slime73@gmail.com>
Mon, 28 Dec 2015 15:44:09 -0400
changeset 99769637657107a3
parent 9975 bb853b9549d0
child 9977 f9cd179cf50e
Mac: expose joystick buttons that report themselves as having 'Start' and 'Select' HID usages.

I don't know if any joysticks report those usages for any buttons in practice, but other prominent Mac gaming software exposes them, so we might as well too.
src/joystick/darwin/SDL_sysjoystick.c
     1.1 --- a/src/joystick/darwin/SDL_sysjoystick.c	Mon Dec 28 13:30:58 2015 -0500
     1.2 +++ b/src/joystick/darwin/SDL_sysjoystick.c	Mon Dec 28 15:44:09 2015 -0400
     1.3 @@ -247,6 +247,8 @@
     1.4                              case kHIDUsage_GD_DPadDown:
     1.5                              case kHIDUsage_GD_DPadRight:
     1.6                              case kHIDUsage_GD_DPadLeft:
     1.7 +                            case kHIDUsage_GD_Start:
     1.8 +                            case kHIDUsage_GD_Select:
     1.9                                  if (!ElementAlreadyAdded(cookie, pDevice->firstButton)) {
    1.10                                      element = (recElement *) SDL_calloc(1, sizeof (recElement));
    1.11                                      if (element) {