sdlGetNumHapticAxes function

int sdlGetNumHapticAxes(
  1. Pointer<SdlHaptic> haptic
)

Get the number of haptic axes the device has.

The number of haptic axes might be useful if working with the SDL_HapticDirection effect.

\param haptic the SDL_Haptic device to query. \returns the number of axes on success or -1 on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC int SDLCALL SDL_GetNumHapticAxes(SDL_Haptic *haptic)

Implementation

int sdlGetNumHapticAxes(Pointer<SdlHaptic> haptic) {
  final sdlGetNumHapticAxesLookupFunction = libSdl3.lookupFunction<
      Int32 Function(Pointer<SdlHaptic> haptic),
      int Function(Pointer<SdlHaptic> haptic)>('SDL_GetNumHapticAxes');
  return sdlGetNumHapticAxesLookupFunction(haptic);
}