SDL_GetTouchFingers(3)

πŸ’– NAME πŸ’–

SDL_GetTouchFingers β€” bestie, this is the one that hands you the whole squad of fingers currently touching down on a given touch device. Like, all the active ones. At once. Periodt. ✨


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_touch.h>

SDL_Finger ** SDL_GetTouchFingers(SDL_TouchID touchID, int *count);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • touchID β€” the ID of a touch device. That's the device you're asking about, okay? Gotta know which screen we're vibing with. 🫢
  • count β€” a pointer that gets filled in with the number of fingers returned. And listen, it can be NULL if you literally do not care how many there are. No pressure. πŸ’…

✨ RETURN VALUE ✨

It returns a NULL terminated array of SDL_Finger pointers β€” or NULL on failure. If it fails, no cap, go call SDL_GetError() for the deets on what went wrong. 😭

Heads up bestie: this is a single allocation, and you gotta free it with SDL_free() when you don't need it anymore. Don't just leave it hanging, that's not the vibe. 🧚

πŸ¦‹ AVAILABILITY πŸ¦‹

This function is available since SDL 3.2.0. So if you're on anything older, it's giving... nothing. Upgrade, queen. πŸ‘‘


Simple Directmedia Layer 🌈 SDL 3.4.18 🌈 SDL_GetTouchFingers(3) β€” that's the whole page, mwah πŸ’‹ thanks for reading, now go touch some (virtual) grass with your fingers array πŸ“βœ¨

πŸ“¦ where this page comes from