SDL_GetTouchDeviceType(3)

πŸ’… SDL_GetTouchDeviceType

okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, and today's main character is SDL_GetTouchDeviceType ✨ she's short, she's sweet, and she does exactly one thing: she tells you what kind of touch device you're dealing with. no cap. 🫢


🌸 NAME 🌸

SDL_GetTouchDeviceType β€” get the type of the given touch device. that's it, that's the whole job, and she ate. πŸ‘‘


✨ SYNOPSIS ✨

#include <SDL3/SDL_touch.h>

SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID);

so you pull in SDL_touch.h, you hand her a touchID, and she hands you back an SDL_TouchDeviceType. literally a whole conversation in one line. πŸ’–


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • touchID β€” the ID of a touch device. that's the one and only thing she needs from you. give her the ID, bestie. it's giving "just one number and we're done here." πŸ¦‹

⭐ RETURN VALUE ⭐

Returns touch device type. πŸ’« like, the actual type of the device. that's the tea, that's the whole vibe. 🌈


🧚 AVAILABILITY 🧚

This function is available since SDL 3.2.0. so if you're on anything older than that... yeah no, she's not there yet. upgrade era only. πŸ”₯


ngl there's not a single warning, bug note, or scary caveat on this page β€” she's a sweetheart and she plays nice. 🌸

and that's the whole page, bestie! this little cutie comes to you courtesy of Simple Directmedia Layer in SDL 3.4.18, printed all official-like under the SDL_GetTouchDeviceType(3) name. stay slay, go touch some devices, and remember: type check first, vibes always. πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from