Check whether rumble is supported on a haptic device.
Defined in <SDL3/SDL_haptic.h>
haptic | haptic device to check for rumble support |
Returns SDL_TRUE if the effect is supported or SDL_FALSE if it isn't.
This function is available since SDL 3.0.0.
extern SDL_Haptic* dev;
if (SDL_HapticRumbleSupported(dev)) {
SDL_InitHapticRumble(dev);
SDL_PlayHapticRumble(dev, 1.0f, 3000);
SDL_Delay(3000);
}