mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-12-16 03:15:38 +00:00
Pointer as bool (libsdl-org#7214)
This commit is contained in:
@@ -2658,7 +2658,7 @@ SDL_GamepadType GetMappingType(const char *mapping)
|
||||
char *SetMappingType(char *mapping, SDL_GamepadType type)
|
||||
{
|
||||
const char *type_string = SDL_GetGamepadStringForType(type);
|
||||
if (type_string == NULL || type == SDL_GAMEPAD_TYPE_UNKNOWN) {
|
||||
if (!type_string || type == SDL_GAMEPAD_TYPE_UNKNOWN) {
|
||||
return RemoveMappingValue(mapping, "type");
|
||||
} else {
|
||||
return SetMappingValue(mapping, "type", type_string);
|
||||
|
||||
Reference in New Issue
Block a user