SDL_GetHapticName(3)

✨ SDL_GetHapticName(3) ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where we vibe with haptics πŸ’… this one's a lil function called SDL_GetHapticName, and yes it does exactly what it says on the tin, no cap.


πŸŽ€ NAME πŸŽ€

SDL_GetHapticName β€” get the implementation dependent name of a haptic device. that's it, that's the whole job. lowkey iconic.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_haptic.h>

const char * SDL_GetHapticName(SDL_Haptic *haptic);

look at her. one include, one function, zero drama. πŸ¦‹


πŸ’– FUNCTION PARAMETERS πŸ’–

  • haptic β€” the SDL_Haptic you got from SDL_OpenJoystick(). like, you literally cannot pass anything else here, bestie, it's giving that specific haptic pointer and nothing more.

⭐ RETURN VALUE ⭐

She returns the name of the selected haptic device. slay. 🫢

But listen β€” if no name can be found, this function returns NULL. 😭 and if that happens? call SDL_GetError() for more information. periodt. don't just sit there staring at your NULL, go get the tea from the error function.


🌈 AVAILABILITY 🌈

This function is available since SDL 3.2.0. so if you're on something older, it's giving not for you, sorry babe. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, no notes. this lil slice of the manual came to you from Simple Directmedia Layer, version SDL 3.4.18 πŸ’… go forth and name your haptics, bestie, mwah πŸŽ€βœ¨πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from