SDL_GetTouchDeviceName(3)

πŸ’– SDL_GetTouchDeviceName πŸ’–

okay bestie, so this one is a whole little function from the SDL3 touch squad, and it's literally just "hey, what's this touch thing called?" 🫢


✨ NAME ✨

SDL_GetTouchDeviceName β€” get the touch device name as reported from the driver. no cap, that's the whole job. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_touch.h>

const char * SDL_GetTouchDeviceName(SDL_TouchID touchID);

like yes, that's the include, and yes, that's the exact signature. copy it exactly, don't get creative πŸ’…


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • touchID β€” the touch device instance ID. that's it, that's the only thing you hand over. it's giving "one (1) whole argument, and she's an ID" 🌈

πŸ¦‹ RETURN VALUE πŸ¦‹

so she returns the touch device name β€” the actual name string, straight from the driver, as-is. πŸ’–

but if it doesn't work out? you get NULL. NULL!! and not in a cute way. 😭

if you get NULL back, that's a failure, bestie β€” go call SDL_GetError() for more information before you spiral. fr fr, that's what it's there for. πŸ”₯

⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. so if you're on something older than that, she's simply not there yet, sorry babe 🧚


okay so that's the whole page, every last crumb of it, nothing skipped, nothing invented πŸ’œ

this lil' cutie lives in the Simple Directmedia Layer world, version SDL 3.4.18 β€” that's the source and the version, straight from the footer, mwah πŸ’…βœ¨πŸŽ€πŸ“

later bestie, go read your driver names in peace πŸ¦‹πŸ’–

πŸ“¦ where this page comes from