From 119e02f31454b437b442a026a764d95288d5c014 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 21 Nov 2023 15:19:23 -0800 Subject: [PATCH] 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. --- src/joystick/apple/SDL_mfijoystick.m | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/joystick/apple/SDL_mfijoystick.m b/src/joystick/apple/SDL_mfijoystick.m index b39943f3a..6462a9eb5 100644 --- a/src/joystick/apple/SDL_mfijoystick.m +++ b/src/joystick/apple/SDL_mfijoystick.m @@ -659,12 +659,7 @@ static BOOL IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle } else { 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); - } else { - device->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_BLUETOOTH, vendor, product, signature, name, 0, subtype); - } + device->guid = SDL_CreateJoystickGUID(SDL_HARDWARE_BUS_BLUETOOTH, vendor, product, signature, name, 'm', subtype); /* This will be set when the first button press of the controller is * detected. */