SDL_IsJoystickHaptic(3)
π SDL_IsJoystickHaptic π
okay bestie so you're deep in the SDL3 docs, page SDL_IsJoystickHaptic(3), and you need to know one (1) thing: does this controller actually vibrate? π«¨β¨
β¨ NAME β¨
SDL_IsJoystickHaptic β lowkey just asking "does this joystick have haptic features?" π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_haptic.h>
bool SDL_IsJoystickHaptic(SDL_Joystick *joystick);
π¦ FUNCTION PARAMETERS π¦
joystickβ theSDL_Joystickyou want to vibe-check for haptic capabilities. like, this one, right here, is it a rumble girlie or not π
β RETURN VALUE β
Returns true if the joystick is haptic, or false if it isn't. that's it, that's the whole answer, no cap π―
π AVAILABILITY π
This function is available since SDL 3.2.0. so if you're on something olderβ¦ yeah no, it's not gonna be there π
π SEE ALSO π
SDL_OpenHapticFromJoystick(3)β the natural next step once you get thattrue, go actually open the thing π«Ά
mwah π that's the whole page, from the lovely people at Simple Directmedia Layer, this is SDL 3.4.18, and it's still SDL_IsJoystickHaptic(3) bestie β go make something rumble πβ¨π
π¦ 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