SDL_HapticID(3type)

πŸ’– NAME πŸ’–

okay bestie, so SDL_HapticID is literally a unique ID for a haptic device β€” and it stays that device's ID for the whole time it's connected to the system. and get this: it is never reused for the lifetime of the application. not once. not ever. periodt. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_haptic.h>

typedef Uint32 SDL_HapticID;

like yes, it's just a Uint32 under the hood, we love a lowkey typedef. 🫢


🌸 DESCRIPTION 🌸

so here's the tea, bestie: if the haptic device gets disconnected and then reconnected? it comes back with a new ID. brand new. glow-up era. it does not get its old one back. πŸ¦‹

and the value 0 is an invalid ID. so if you see a zero, that's not a device, that's a nothing-burger. do not pass go, do not collect a haptic vibe. πŸ’€


πŸŽ€ AVAILABILITY πŸŽ€

this datatype has been available since SDL 3.2.0. so if you're on anything older, sorry babe, it's giving "not yet." 😭


and that's the whole page, bestie!! no cap, that's everything. 🧚

this lil manual page came to you from Simple Directmedia Layer, rockin' version SDL 3.4.18. stan. πŸ’œ ✨

πŸ“¦ where this page comes from