mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-03-20 15:51:07 +01: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:
@@ -86,7 +86,7 @@ int main(int argc, char **argv)
|
||||
haptics = SDL_GetHaptics(&num_haptics);
|
||||
SDL_Log("%d Haptic devices detected.\n", num_haptics);
|
||||
for (i = 0; i < num_haptics; ++i) {
|
||||
SDL_Log(" %s\n", SDL_GetHapticNameFromID(haptics[i]));
|
||||
SDL_Log(" %s\n", SDL_GetHapticNameForID(haptics[i]));
|
||||
}
|
||||
if (haptics) {
|
||||
if (num_haptics == 0) {
|
||||
@@ -108,7 +108,7 @@ int main(int argc, char **argv)
|
||||
/* Try to find matching device */
|
||||
else {
|
||||
for (i = 0; i < num_haptics; i++) {
|
||||
if (SDL_strstr(SDL_GetHapticNameFromID(haptics[i]), name) != NULL) {
|
||||
if (SDL_strstr(SDL_GetHapticNameForID(haptics[i]), name) != NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user