SDL_HINT_JOY...STICK_DEVICES(3)

πŸ’– SDL_HINT_JOY...STICK_DEVICES(3) πŸ’–

okay bestie, so this is a page from the SDL3 manual (that's SDL_HINT_JOY...STICK_DEVICES(3), in case you were wondering which one we're vibing with) and it's all about one very specific little hint. she's niche. she's important. let's get into it πŸ¦‹


✨ NAME ✨

SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES β€” a variable that holds a whole list of flightstick style controllers. yes, like, the plane-y ones. the ones with the joystick that goes brrr πŸ›©οΈ


🌸 SYNOPSIS 🌸

so this is how you even get to her:

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"

that's it, that's the whole entrance. iconic. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

okay so the format of the string? it's literally just a comma separated list of USB VID/PID pairs, and they have to be in hexadecimal form. like, for example:

0xAAAA/0xBBBB,0xCCCC/0xDDDD

see how it's just pairs with a slash between them, and commas between the pairs? yeah. that's the whole vibe. πŸŽ€

AND, plot twist, the variable can also take the form of @file β€” and in that case, the named file gets loaded and interpreted as the value of the variable. so instead of typing out the whole list you can just point at a file and be like "it's in there bestie, trust" πŸ“βœ¨

also, this hint can be set anytime. no waiting. no special window. she's flexible. 🫢

🌈 AVAILABILITY 🌈

this hint has been around since SDL 3.2.0. so if you're on anything older... girl, we need to talk πŸ’€


and that's the whole page!! short and sweet, just like a good group chat message. go forth and configure your flightsticks, you absolute main character πŸ‘‘

β€” written by the Simple Directmedia Layer girlies, from the SDL 3.4.18 era, SDL_HINT_JOY...STICK_DEVICES(3), mwah πŸ’‹ no cap, fr fr πŸ¦‹πŸ’–

πŸ“¦ where this page comes from