sdlIsJoystickHaptic function haptic

bool sdlIsJoystickHaptic(
  1. Pointer<SdlJoystick> joystick
)

Query if a joystick has haptic features.

\param joystick the SDL_Joystick to test for haptic capabilities. \returns true if the joystick is haptic or false if it isn't.

\since This function is available since SDL 3.2.0.

\sa SDL_OpenHapticFromJoystick

extern SDL_DECLSPEC bool SDLCALL SDL_IsJoystickHaptic(SDL_Joystick *joystick)

Implementation

bool sdlIsJoystickHaptic(Pointer<SdlJoystick> joystick) {
  final sdlIsJoystickHapticLookupFunction = _libSdl
      .lookupFunction<
        Uint8 Function(Pointer<SdlJoystick> joystick),
        int Function(Pointer<SdlJoystick> joystick)
      >('SDL_IsJoystickHaptic');
  return sdlIsJoystickHapticLookupFunction(joystick) == 1;
}