You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
26 lines
899 B
Diff
26 lines
899 B
Diff
diff --git a/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m b/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m
|
|
index 811a9f1ae7..2ba2cbeae6 100644
|
|
--- a/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m
|
|
+++ b/thirdparty/sdl/joystick/apple/SDL_mfijoystick.m
|
|
@@ -300,9 +300,15 @@ static bool IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
|
|
* struct, and ARC doesn't work with structs. */
|
|
device->controller = (__bridge GCController *)CFBridgingRetain(controller);
|
|
|
|
- if (controller.vendorName) {
|
|
- name = controller.vendorName.UTF8String;
|
|
- }
|
|
+ if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
|
|
+ if (controller.productCategory) {
|
|
+ name = controller.productCategory.UTF8String;
|
|
+ }
|
|
+ } else {
|
|
+ if (controller.vendorName) {
|
|
+ name = controller.vendorName.UTF8String;
|
|
+ }
|
|
+ }
|
|
|
|
if (!name) {
|
|
name = "MFi Gamepad";
|
|
--
|
|
2.51.0
|