sdlHapticIndex function

int sdlHapticIndex(
  1. Pointer<SdlHaptic> haptic
)

Get the index of a haptic device.

\param haptic the SDL_Haptic device to query \returns the index of the specified haptic device 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_HapticOpen \sa SDL_HapticOpened

extern DECLSPEC int SDLCALL SDL_HapticIndex(SDL_Haptic * haptic)

Implementation

int sdlHapticIndex(Pointer<SdlHaptic> haptic) {
  final sdlHapticIndexLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Pointer<SdlHaptic> haptic),
      int Function(Pointer<SdlHaptic> haptic)>('SDL_HapticIndex');
  return sdlHapticIndexLookupFunction(haptic);
}