SDL_GetGamepadAppleSFSymbolsNameForButton() returns NULL if the symbol isn't found

Fixes https://github.com/libsdl-org/SDL/issues/9071
main
Sam Lantinga 2024-03-03 11:07:39 -08:00
parent 74f4614289
commit c1da39a245
1 changed files with 4 additions and 3 deletions

View File

@ -3750,10 +3750,11 @@ const char *SDL_GetGamepadAppleSFSymbolsNameForButton(SDL_Gamepad *gamepad, SDL_
}
SDL_UnlockJoysticks();
return retval;
#else
return NULL;
if (retval && *retval) {
return retval;
}
#endif
return NULL;
}
const char *SDL_GetGamepadAppleSFSymbolsNameForAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis)