SDL_HINT_JOY...RELATE_XINPUT(3)

πŸ’– NAME πŸ’–

SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT β€” okay so bestie, this is the variable that decides whether the RAWINPUT driver should go grab correlated data from XInput. Yes, they're talking to each other. It's giving collaborative. 🫢


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"

That #define is literally just the string, character for character, no cap. πŸ’…


πŸŽ€ DESCRIPTION πŸŽ€

So the variable can be set to these values, and you're gonna want to pick one:

  • "0" β€” RAWINPUT driver will only use data from raw input APIs. Nothing else, no side quests, it stays in its lane. πŸ¦‹
  • "1" β€” RAWINPUT driver will also pull data from XInput and Windows.Gaming.Input, which gives you better trigger axes, guide button presses, and rumble support for Xbox controllers. πŸ‘‘βœ¨ And yeah β€” this is the default. The main character option, honestly.
🌸 Important vibe check: this hint should be set before a gamepad is opened. Like, set it early, bestie. Timing matters. Don't come in late and expect it to work, because it will not. 😭

πŸ’œ AVAILABILITY πŸ’œ

This hint is available since SDL 3.2.0. It's not ancient lore, it's a newer era. 🧚


Anyway, that's the whole page β€” Simple Directmedia Layer, SDL 3.4.18, from the SDL3 FUNCTIONS manual. Slay, go correlate your inputs, ily, mwah πŸ’–πŸ’…πŸŽ€

πŸ“¦ where this page comes from