sdlHapticRumbleSupported function

bool sdlHapticRumbleSupported(
  1. Pointer<SdlHaptic> haptic
)

Check whether rumble is supported on a haptic device.

\param haptic haptic device to check for rumble support. \returns true if the effect is supported or false if it isn't.

\since This function is available since SDL 3.1.3.

\sa SDL_InitHapticRumble

extern SDL_DECLSPEC bool SDLCALL SDL_HapticRumbleSupported(SDL_Haptic *haptic)

Implementation

bool sdlHapticRumbleSupported(Pointer<SdlHaptic> haptic) {
  final sdlHapticRumbleSupportedLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlHaptic> haptic),
      int Function(Pointer<SdlHaptic> haptic)>('SDL_HapticRumbleSupported');
  return sdlHapticRumbleSupportedLookupFunction(haptic) == 1;
}