sdlJoystickIsHaptic function

int sdlJoystickIsHaptic(
  1. Pointer<SdlJoystick> joystick
)

Query if a joystick has haptic features.

\param joystick the SDL_Joystick to test for haptic capabilities \returns SDL_TRUE if the joystick is haptic, SDL_FALSE if it isn't, or a negative error code on failure; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_HapticOpenFromJoystick

extern DECLSPEC int SDLCALL SDL_JoystickIsHaptic(SDL_Joystick * joystick)

Implementation

int sdlJoystickIsHaptic(Pointer<SdlJoystick> joystick) {
  final sdlJoystickIsHapticLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlJoystick> joystick),
      int Function(Pointer<SdlJoystick> joystick)>('SDL_JoystickIsHaptic');
  return sdlJoystickIsHapticLookupFunction(joystick);
}