SDL_HINT_EVDEV_DEVICES(3)

πŸ’– NAME πŸ’–

SDL_HINT_EVDEV_DEVICES β€” a lil variable that holds a whole list of evdev devices to use when udev isn't available. bestie, it's the backup plan ✨

(oh and hey, this whole page lives in the SDL3 FUNCTIONS manual, section 3, iykyk 🫢)


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_EVDEV_DEVICES "SDL_EVDEV_DEVICES"

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the list of devices? it's giving this format exactly:

deviceclass:path[,deviceclass:path[,...]]

and let's break that down fr fr:

  • deviceclass is an integer that represents the SDL_UDEV_deviceclass β€” yes, an integer, no vibes-based guessing πŸ’…
  • path is the full path to the event device. the full path. all of it. πŸ‘‘

and you can chain as many deviceclass:path pairs as you want, separated by commas β€” the [,...] is literally telling you "yeah keep going, add more" πŸ”₯

⚠️ set this hint before SDL is initialized. like, before. not during, not after, not mid-init while you're distracted by a snack. before. no cap. πŸ™ˆ

⭐ AVAILABILITY ⭐

this hint has been around since SDL 3.2.0 β€” so if you're on anything older, it's not ghosting you, it just doesn't exist yet 😭


made with love by the Simple Directmedia Layer crew, currently serving SDL 3.4.18 πŸ’œ β€” go forth and enumerate those event devices, you absolute icon πŸ‘‘βœ¨

πŸ“¦ where this page comes from