SDL_GamepadHasSensor(3)
β¨ NAME β¨
SDL_GamepadHasSensor β return whether a gamepad has a particular sensor. Like, bestie, we're checking if your controller has that sensor situation going on. π
Okay so, this page lives in the SDL3 FUNCTIONS manual, and it's literally here to answer one tiny but iconic question: does this gamepad have this sensor? Yes or no. That's the whole plot. π
π¦ SYNOPSIS π¦
#include <SDL3/SDL_gamepad.h>
bool SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type);
πΈ FUNCTION PARAMETERS πΈ
gamepadβ the gamepad to query. The one you're side-eyeing and asking, "do you have it or not?" π«Άtypeβ the type of sensor to query. Like, which sensor are we checking for? π
π RETURN VALUE π
Returns true if the sensor exists, false otherwise. Simple. Clean. No cap. β¨
π§ THREAD SAFETY π§
It is safe to call this function from any thread. So yes, you can call it from any thread, bestie. Thread-safe and unbothered. π
β AVAILABILITY β
This function is available since SDL 3.2.0. Periodt. π
π SEE ALSO π
Simple Directmedia Layer β’ SDL 3.4.18 β that's the footer energy, bestie. No date printed on this one, just pure SDL3 FUNCTIONS realness. Stay slay. ππ¦
π¦ 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