SDL_HapticEffectSupported(3)
β¨ SDL_HapticEffectSupported β¨
okay so bestie, this one lives in the SDL3 FUNCTIONS squad and it's literally the vibe-check function for haptic effects π
πΈ NAME πΈ
SDL_HapticEffectSupported β check to see if an effect is supported by a haptic device π
Like, before you go spending all your main character energy building a whole custom rumble effect, you ask the device first. No cap. It's giving "does this even work here, or are we wasting our time" π¦
π«Ά SYNOPSIS π«Ά
#include <SDL3/SDL_haptic.h>
bool SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect);
π FUNCTION PARAMETERS π
hapticβ theSDL_Hapticdevice to query π like, the one you're asking. The source of truth. The oracle, if you will.effectβ the desired effect to query π« the actual effect you're wondering about. Drop it in, get your answer.
β RETURN VALUE β
Returns true if the effect is supported, or false if it isn't π
That's it. That's the whole thing. Binary. Iconic. No ambiguous maybe-energy, just yes or no, periodt π
π₯ AVAILABILITY π₯
This function is available since SDL 3.2.0 β¨ so if you're on anything older, bestie, you're out of luck π
π SEE ALSO π
so yeah, that's the whole page β go forth and query your haptics, you gorgeous nerd π§
this lil' slice of documentation came courtesy of Simple Directmedia Layer β SDL 3.4.18, dated right alongside SDL_HapticEffectSupported(3) π stay slay, stay haptic-aware π
π¦ 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