SDL_GetSensorName(3)

✨ SDL_GetSensorName(3) ✨

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, this one's SDL_GetSensorName and it's lowkey adorable πŸŽ€


🌸 NAME 🌸

SDL_GetSensorName β€” get the implementation dependent name of a sensor.

like. it tells you what your sensor is called. the name the implementation gave it. that's the whole gig πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <SDL3/SDL_sensor.h>

const char * SDL_GetSensorName(SDL_Sensor *sensor);

she's short, she's sweet, she takes one pointer and hands you back a const char * ✨


πŸ’– FUNCTION PARAMETERS πŸ’–

  • sensor β€” the SDL_Sensor object. that's it. that's the whole ask. your lil sensor guy 🫢

🌈 RETURN VALUE 🌈

Returns the sensor name, or NULL on failure 😭 β€” and if you get NULL, don't just sit there spiraling, call SDL_GetError() for more information, she'll tell you what went wrong, no cap.

fr fr: NULL is the vibe check failing. always check the error before you start guessing πŸ™ˆ

⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. so if you're on anything older, bestie, that's a no πŸ’€


and that's the whole page, you ate it, periodt πŸ‘‘

Simple Directmedia Layer β€” SDL 3.4.18 πŸ’œ mwah, go name some sensors, i'm obsessed with you 🧚✨

πŸ“¦ where this page comes from