sdlxHapticEffectSupported function haptic

bool sdlxHapticEffectSupported(
  1. Pointer<SdlHaptic> haptic,
  2. SdlxHapticEffect effect
)

Check to see if an effect is supported by a haptic device.

\param haptic the SDL_Haptic device to query. \param effect the desired effect to query. \returns true if the effect is supported or false if it isn't.

\since This function is available since SDL 3.2.0.

\sa SDL_CreateHapticEffect \sa SDL_GetHapticFeatures

extern SDL_DECLSPEC bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect)

Implementation

bool sdlxHapticEffectSupported(
  Pointer<SdlHaptic> haptic,
  SdlxHapticEffect effect,
) {
  final effectPointer = effect.calloc();
  final result = sdlHapticEffectSupported(haptic, effectPointer);
  effectPointer.callocFree();
  return result;
}