SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE(3)

πŸ’– SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE πŸ’–

okay bestie, this one lives in the SDL3 FUNCTIONS manual, and it's literally just a lil hint that decides whether your relative mouse motion gets run through the system's mouse acceleration curve. that's the whole vibe. πŸ¦‹


✨ NAME ✨

SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE β€” a variable controlling whether the system mouse acceleration curve is used for relative mouse motion. yes, it's a whole mouthful, but she's iconic for it. πŸ’…


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"

πŸŽ€ DESCRIPTION πŸŽ€

so you can set this variable to these values, no cap:

  • "0" β€” relative mouse motion will be unscaled. this is the default, the lil home base. 🏠
  • "1" β€” relative mouse motion will be scaled using the system mouse acceleration curve.

and here's the tea, bestie: if SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will be applied after system speed scale. order matters, fr fr. 🫢

good news though β€” this hint can be set anytime. no timing anxiety, no waiting for the right moment, she's flexible like that. ✨

not me casually reminding you that the default is unscaled so if you're expecting acceleration you're gonna be confused πŸ’€

🌈 AVAILABILITY 🌈

this hint is available since SDL 3.2.0. so if you're on something older... bestie, it's giving ancient. πŸ‘‘


Simple Directmedia Layer πŸ¦‹ SDL 3.4.18 β€” mwah, that's the source and the version, and this lil page is SDL_HINT_MOUS..._SYSTEM_SCALE(3). thanks for coming to my ted talk, go scale some mice responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from