Don't put 'm' in the GUID for Xbox and PS4 controllers on iOS

This commit is contained in:
Sam Lantinga
2020-11-09 18:45:22 -08:00
parent f656d8456e
commit fb4a406af2
2 changed files with 6 additions and 4 deletions

View File

@@ -235,7 +235,7 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle
/* Assume DS4 Slim unless/until GCController flows VID/PID */
vendor = USB_VENDOR_SONY;
product = USB_PRODUCT_SONY_DS4_SLIM;
if ( device->has_dualshock_touchpad ) {
if (device->has_dualshock_touchpad) {
subtype = 1;
} else {
subtype = 0;
@@ -305,10 +305,12 @@ IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCController *controlle
*guid16++ = SDL_SwapLE16(device->button_mask);
if (subtype != 0) {
if (vendor == USB_VENDOR_APPLE) {
/* Note that this is an MFI controller and what subtype it is */
device->guid.data[14] = 'm';
device->guid.data[15] = subtype;
} else {
device->guid.data[15] = subtype;
}
/* This will be set when the first button press of the controller is