mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-01 03:24:56 +00:00
Renamed *FromID() to *ForID()
While it makes sense to get an object pointer from an object ID, you want to get object attributes for an ID, otherwise e.g. GetNameFromID() sounds like it's a name ID, not an object ID. This is also consistent with the function naming convention in SDL2.
This commit is contained in:
@@ -238,7 +238,7 @@ static SDL_bool SDL_GetDriverAndSensorIndex(SDL_SensorID instance_id, SDL_Sensor
|
||||
/*
|
||||
* Get the implementation dependent name of a sensor
|
||||
*/
|
||||
const char *SDL_GetSensorNameFromID(SDL_SensorID instance_id)
|
||||
const char *SDL_GetSensorNameForID(SDL_SensorID instance_id)
|
||||
{
|
||||
SDL_SensorDriver *driver;
|
||||
int device_index;
|
||||
@@ -253,7 +253,7 @@ const char *SDL_GetSensorNameFromID(SDL_SensorID instance_id)
|
||||
return name ? SDL_FreeLater(SDL_strdup(name)) : NULL;
|
||||
}
|
||||
|
||||
SDL_SensorType SDL_GetSensorTypeFromID(SDL_SensorID instance_id)
|
||||
SDL_SensorType SDL_GetSensorTypeForID(SDL_SensorID instance_id)
|
||||
{
|
||||
SDL_SensorDriver *driver;
|
||||
int device_index;
|
||||
@@ -268,7 +268,7 @@ SDL_SensorType SDL_GetSensorTypeFromID(SDL_SensorID instance_id)
|
||||
return type;
|
||||
}
|
||||
|
||||
int SDL_GetSensorNonPortableTypeFromID(SDL_SensorID instance_id)
|
||||
int SDL_GetSensorNonPortableTypeForID(SDL_SensorID instance_id)
|
||||
{
|
||||
SDL_SensorDriver *driver;
|
||||
int device_index;
|
||||
|
||||
Reference in New Issue
Block a user