SDL_HINT_AUTO_UPDATE_SENSORS(3)
π SDL_HINT_AUTO_UPDATE_SENSORS π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual, where today's main character is SDL_HINT_AUTO_UPDATE_SENSORS β a hint that decides whether SDL is out here updating your sensor state while it's grabbing input events, or whether you are doing that yourself. no cap. β¨
β¨ NAME β¨
SDL_HINT_AUTO_UPDATE_SENSORS β a variable that controls whether SDL updates sensor state when getting input events. that's it, that's the whole vibe. π¦
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
literally just include the header and you've got the macro, periodt. π
π DESCRIPTION π
so the way this works is you set the variable to one of these two values, and the universe (well, SDL) responds accordingly:
"0"β you'll callSDL_UpdateSensors()manually. that's you being the main character and handling it yourself, we respect it. π"1"β SDL will automatically callSDL_UpdateSensors(). this one is the default, so if you don't say anything, SDL just handles it for you. iconic behaviour honestly. π₯
also! this hint can be set anytime. no waiting around, no "only before init" nonsense. set it whenever your heart desires. π
π AVAILABILITY π
this hint is available since SDL 3.2.0. so if you're on anything older, bestie, it's giving β¨ nothing β¨ β you gotta upgrade. π
and that's the whole page, bestie!! you ate that. π β¨
kisses and sensor updates, from the Simple Directmedia Layer girlies β this is SDL 3.4.18, SDL_HINT_AUTO_UPDATE_SENSORS(3), signing off π«ΆπΈπ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms