SDL_HINT_JOY...ICES_EXCLUDED(3)

๐Ÿ’… SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED ๐Ÿ’…

okay bestie so this one's a lil page from the SDL3 FUNCTIONS manual, and it's all about one very specific little hint. buckle up ๐ŸŽ€


โœจ NAME โœจ

SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED โ€” a variable that's literally just a whole list of devices that we know don't have a GameCube form factor. like, they're not cube-shaped. we're excluding them. periodt. ๐Ÿšซ๐ŸŽฎ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"

yeah that's the whole thing. a #include and a #define. slay. ๐Ÿ’–


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

so here's the tea: setting this hint overrides SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built-in device list. like, it fully takes the wheel. ๐ŸŽ€

the format? it's a comma separated list of USB VID/PID pairs, all in hexadecimal form, like this:

0xAAAA/0xBBBB,0xCCCC/0xDDDD

and โ€” plot twist โ€” the variable can also be written as "@file", and in that case the file you named gets loaded and read as if it were the value of the variable. cute, right? ๐Ÿ“โœจ

you can set this hint anytime. no waiting around. no timing drama. iykyk. ๐Ÿ’…


๐Ÿ‘‘ AVAILABILITY ๐Ÿ‘‘

this hint has been around since SDL 3.2.0. it's not new new, but it's not ancient either. it's giving established. ๐ŸŒˆ


and that's the whole page, bestie!! every single detail, no notes, no cap. ๐Ÿซถ this icon of a hint comes to you from Simple Directmedia Layer, version SDL 3.4.18 โ€” go forth and exclude those non-GameCube devices, you absolute main character ๐Ÿ’–โœจ๐ŸŽ€

๐Ÿ“ฆ where this page comes from