Skip to content

Commit

Permalink
Added support for the Backbone One controller on iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken authored and icculus committed Apr 27, 2022
1 parent eae8aaa commit 6fdeb43
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/joystick/iphoneos/SDL_mfijoystick.m
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,19 @@ @interface GCMicroGamepad (SDL)
subtype = 1;
}

if (SDL_strcmp(name, "Backbone One") == 0) {
/* The Backbone app uses the guide and share buttons */
if ((device->button_mask & (1 << SDL_CONTROLLER_BUTTON_GUIDE)) != 0) {
device->button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_GUIDE);
--nbuttons;
}
if ((device->button_mask & (1 << SDL_CONTROLLER_BUTTON_MISC1)) != 0) {
device->button_mask &= ~(1 << SDL_CONTROLLER_BUTTON_MISC1);
--nbuttons;
device->has_xbox_share_button = SDL_FALSE;
}
}

device->naxes = 6; /* 2 thumbsticks and 2 triggers */
device->nhats = 1; /* d-pad */
device->nbuttons = nbuttons;
Expand Down

0 comments on commit 6fdeb43

Please sign in to comment.