SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED(3)

โœจ NAME โœจ

SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED โ€” okay bestie, this is a variable holding a whole list of devices that should be considered joysticks. That's the whole vibe. It's a hint, it lives in SDL3's functions crew (iykyk), and it's here to tell SDL who's actually a controller. ๐ŸŽฎ๐Ÿ’–


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"

No cap, that's literally the entire synopsis. One include, one define, we move. โœจ


๐Ÿ’… DESCRIPTION ๐Ÿ’…

So here's the tea, bestie: setting this hint overrides both SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in device list. Like, it doesn't play nice and merge with them โ€” it just takes over. Main character energy fr fr. ๐Ÿ‘‘

The format of the string is a comma separated list of USB VID/PID pairs in hexadecimal form, e.g.

0xAAAA/0xBBBB,0xCCCC/0xDDDD

The variable can also take the form of "@file", in which case the named file will be loaded and interpreted as the value of the variable. So instead of cramming your whole list into the string, you just point at a file and it slurps the contents like it's reading your notes app. ๐ŸŽ€

This hint can be set anytime. Not a "before init only" situation โ€” anytime. Slay. ๐Ÿฆ‹

โญ AVAILABILITY โญ

This hint has been available since SDL 3.2.0. Baby but iconic. ๐Ÿผโœจ


Okay that's the whole page, you ate that. ๐Ÿ’… This little gem comes to you from Simple Directmedia Layer, version SDL 3.4.18 โ€” so like, go forth and classify your devices correctly. ๐Ÿซถ๐ŸŒˆ No notes. Periodt. ๐Ÿ’–

๐Ÿ“ฆ where this page comes from