mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 08:56:25 +00:00
Added an SDL error to SDL_GameControllerMapping* functions
This commit is contained in:
@@ -1614,6 +1614,8 @@ SDL_GameControllerMappingForIndex(int mapping_index)
|
||||
return CreateMappingString(mapping, mapping->guid);
|
||||
}
|
||||
--mapping_index;
|
||||
} else {
|
||||
SDL_SetError("Mapping not available");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
@@ -1627,6 +1629,8 @@ SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)
|
||||
ControllerMapping_t *mapping = SDL_PrivateGetControllerMappingForGUID(guid, SDL_FALSE);
|
||||
if (mapping) {
|
||||
return CreateMappingString(mapping, guid);
|
||||
} else {
|
||||
SDL_SetError("Mapping not available");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user