SDL_HINT_JOY...LINUX_CLASSIC(3)

✨ SDL_HINT_JOYSTICK_LINUX_CLASSIC ✨

okay bestie, we're in the SDL3 functions manual and this one is a little Linux joystick hint, and honestly? it's giving "choose your own adventure" but for input devices πŸ’…

It's called SDL_HINT_JOYSTICK_LINUX_CLASSIC, and it controls whether you use the classic /dev/input/js joystick interface or the newer /dev/input/event joystick interface on Linux. no cap, that's the whole vibe.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_LINUX_CLASSIC "SDL_JOYSTICK_LINUX_CLASSIC"

πŸ’– DESCRIPTION πŸ’–

so the variable can be set to the following values, and you literally just pick one:

  • "0" β€” use /dev/input/event* (default)
  • "1" β€” use /dev/input/js*
🫢 bestie, this hint should be set before SDL is initialized. like, before. not after. before. the vibe check happens at init time and you can't just show up late.

🌈 AVAILABILITY 🌈

This hint is available since SDL 3.2.0. she's not ancient, she's just iconic. πŸ‘‘


Simple Directmedia Layer πŸ¦‹ SDL 3.4.18 β€” mwah, that's the source and version, periodt. thanks for reading, ily, go forth and configure your joysticks responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from