sdlHapticEffectSupported function
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.1.3.
\sa SDL_CreateHapticEffect \sa SDL_GetHapticFeatures
extern SDL_DECLSPEC bool SDLCALL SDL_HapticEffectSupported(SDL_Haptic *haptic, const SDL_HapticEffect *effect)
Implementation
bool sdlHapticEffectSupported(
Pointer<SdlHaptic> haptic, Pointer<SdlHapticEffect> effect) {
final sdlHapticEffectSupportedLookupFunction = libSdl3.lookupFunction<
Uint8 Function(
Pointer<SdlHaptic> haptic, Pointer<SdlHapticEffect> effect),
int Function(Pointer<SdlHaptic> haptic,
Pointer<SdlHapticEffect> effect)>('SDL_HapticEffectSupported');
return sdlHapticEffectSupportedLookupFunction(haptic, effect) == 1;
}