mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-02 15:47:31 +08:00
Use the product category if the vendorName isn't available
This commit is contained in:
@@ -306,6 +306,12 @@ static bool IOS_AddMFIJoystickDevice(SDL_JoystickDeviceItem *device, GCControlle
|
|||||||
|
|
||||||
if (controller.vendorName) {
|
if (controller.vendorName) {
|
||||||
name = controller.vendorName.UTF8String;
|
name = controller.vendorName.UTF8String;
|
||||||
|
} else {
|
||||||
|
if (@available(macOS 10.15, iOS 13.0, tvOS 13.0, *)) {
|
||||||
|
if (controller.productCategory) {
|
||||||
|
name = controller.productCategory.UTF8String;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!name) {
|
if (!name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user