SDL_GetSensorType(3)

πŸ’– SDL_GetSensorType(3) πŸ’–

okay so bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_GetSensorType β€” the little glow-up that tells you what kind of sensor you're holding. no cap, it's a short one, but it's iconic. πŸŽ€


✨ NAME ✨

SDL_GetSensorType β€” get the type of a sensor. that's it. that's the whole job. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_sensor.h>

SDL_SensorType SDL_GetSensorType(SDL_Sensor *sensor);

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


🫢 FUNCTION PARAMETERS 🫢

  • sensor β€” the SDL_Sensor object you want to inspect. like, hand her over and she'll tell you what she is. πŸ”

⭐ RETURN VALUE ⭐

she returns the SDL_SensorType type β€” the actual vibe classification of your sensor. 🌈

but if sensor is NULL? yeah, she's not gonna guess. you get SDL_SENSOR_INVALID back. not me handing her nothing and expecting answers πŸ’€

fr fr, pass a real SDL_Sensor or you're getting SDL_SENSOR_INVALID. no in-between.

πŸ‘‘ AVAILABILITY πŸ‘‘

this function has been serving since SDL 3.2.0. so if your SDL is older than that... bestie, it's giving "please update". 😭


and that's the whole page, you ate that. mwah πŸ’‹

this little gem comes to you courtesy of Simple Directmedia Layer, rockin' SDL 3.4.18 β€” stay sensor-y, bestie, and go read some more manpages, iykyk πŸ§šβœ¨πŸ’œ

πŸ“¦ where this page comes from