Always use 'm' for controllers provided by the MFI joystick driver

This makes sure that SDL_JoystickGUIDUsesVersion() returns false and we don't try to match against other similar controllers using old mappings.
main
Sam Lantinga 2023-11-21 15:19:23 -08:00
parent 75df4cc5c2
commit 119e02f314
1 changed files with 1 additions and 6 deletions

View File

@ -659,12 +659,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
} else { } else {
signature = device->button_mask; signature = device->button_mask;
} }
if (vendor == USB_VENDOR_APPLE) {
/* Note that this is an MFI controller and what subtype it is */
device->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_BLUETOOTH, vendor, product, signature, name, 'm', subtype); device->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_BLUETOOTH, vendor, product, signature, name, 'm', subtype);
} else {
device->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_BLUETOOTH, vendor, product, signature, name, 0, subtype);
}
/* This will be set when the first button press of the controller is /* This will be set when the first button press of the controller is
* detected. */ * detected. */