Probably a better fix

This commit is contained in:
Lior Halphon 2025-04-04 01:11:27 +03:00
parent d146b3a309
commit 3468d5de7e
1 changed files with 4 additions and 1 deletions

View File

@ -506,7 +506,10 @@ static UIImage *ImageForController(GCController *controller)
static NSString *LocalizedNameForElement(GCControllerElement *element, GBControllerUsage usage)
{
if (@available(iOS 14.0, *)) {
return element.localizedName ?: @"Unknown Button";
NSString *ret = element.localizedName;
if (ret) {
return element.localizedName;
}
}
switch (usage) {
case GBUsageDpad: return @"D-Pad";