From ca89d9b59332dcbe900031ed3cb730a9018c0244 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Wed, 25 Jan 2017 22:22:05 -0800 Subject: [PATCH] Darwin: fix detection of Xbox One S controller Firmware revision 3.1.1221.0 changes the mapping of the Xbox One S controller in Bluetooth mode. Aside from changing the layout of other buttons, this revision also changes the triggers to act as Accelerator and Brake axes from the simulation controls page. The Darwin sysjoystick code didn't previously map anything at these axes, making it impossible to detect input on these two buttons. --- src/joystick/darwin/SDL_sysjoystick.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/joystick/darwin/SDL_sysjoystick.c b/src/joystick/darwin/SDL_sysjoystick.c index 668580a52a73c..edf35794c402e 100644 --- a/src/joystick/darwin/SDL_sysjoystick.c +++ b/src/joystick/darwin/SDL_sysjoystick.c @@ -248,6 +248,8 @@ AddHIDElement(const void *value, void *parameter) switch (usage) { case kHIDUsage_Sim_Rudder: case kHIDUsage_Sim_Throttle: + case kHIDUsage_Sim_Accelerator: + case kHIDUsage_Sim_Brake: if (!ElementAlreadyAdded(cookie, pDevice->firstAxis)) { element = (recElement *) SDL_calloc(1, sizeof (recElement)); if (element) {