SDL_PEN_TOUCHID(3)

πŸ’… SDL_PEN_TOUCHID πŸ’…

okay bestie, gather round, because this one is a tiny little macro and it is lowkey iconic πŸŽ€

✨ NAME ✨

SDL_PEN_TOUCHID β€” it's the SDL_TouchID that shows up for touch events that got simulated from pen input. like, when your pen is out here doing pen things but the events are being dressed up as touch events? yeah. this is the ID they wear to the party. πŸ–ŠοΈβž‘οΈπŸ‘†


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_pen.h>

#define SDL_PEN_TOUCHID ((SDL_TouchID)-2)

okay so the whole entire thing is that one #define, and it's literally:

  • SDL_PEN_TOUCHID β€” expands to ((SDL_TouchID)-2). yes, that is a negative two. yes, cast to SDL_TouchID. no, we do not make the rules, we just think it's iconic. πŸ’€
fr fr, if you're comparing a SDL_TouchID and wondering "hmm is this a simulated-from-pen situation?", this is the value you check against. the vibes are immaculate, the number is -2. 🫢

🌈 AVAILABILITY 🌈

this macro has been serving since SDL 3.2.0. so if you're on anything older, sorry bestie, it's not giving what you need. 😭


and that's the whole page, no notes, periodt. πŸ’…

this cutie came to you straight from Simple Directmedia Layer, sitting pretty at version SDL 3.4.18 β€” she's SDL_PEN_TOUCHID(3), she's short, she's sweet, she's -2, and she ate. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from