SDL_HINT_JOY...TERED_DEVICES(3)

✨ NAME ✨

SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES β€” a variable holding a whole lil list of devices that are known to have all their axes centered at zero πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, the format of this string? it's a comma separated list of USB VID/PID pairs, written out in hexadecimal form. like, literally, for example:

0xAAAA/0xBBBB,0xCCCC/0xDDDD

and here's the part that's giving ✨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. the way that it just. reads the file. iconic behavior honestly 🫢

πŸ’… lowkey important: this hint should be set before a controller is opened. like, before. not after. before. periodt.

🌈 AVAILABILITY 🌈

this hint is available since SDL 3.2.0 β€” so if you're on anything older, no she doesn't exist yet, sorry bestie 😭


and that's the whole vibe! πŸŽ€ this lil page came to you from Simple Directmedia Layer, version SDL 3.4.18, and yeah the header/footer both say SDL_HINT_JOY...TERED_DEVICES(3) because the name is long enough to need a nap πŸ’€ under the SDL3 FUNCTIONS manual. mwah, go center those axes, you got this πŸ‘‘πŸ’–

πŸ“¦ where this page comes from