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

Fixes https://github.com/libsdl-org/SDL/issues/9071
This commit is contained in:
Sam Lantinga committed 2024-03-03 11:09:03 -08:00
1 parent 05f6709617
commit b87116ff03
1 file changed
+4 -3
+4 -3
View File
@@ -3259,10 +3259,11 @@ const char *SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController
} }
SDL_UnlockJoysticks(); SDL_UnlockJoysticks();
return retval; if (retval && *retval) {
#else return retval;
return NULL; }
#endif #endif
return NULL;
} }
const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis) const char *SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)