sdlGetHaptics function

Pointer<Uint32> sdlGetHaptics(
  1. Pointer<Int32> count
)

Get a list of currently connected haptic devices.

\param count a pointer filled in with the number of haptic devices returned, may be NULL. \returns a 0 terminated array of haptic device instance IDs or NULL on failure; call SDL_GetError() for more information. This should be freed with SDL_free() when it is no longer needed.

\since This function is available since SDL 3.1.3.

\sa SDL_OpenHaptic

extern SDL_DECLSPEC SDL_HapticID * SDLCALL SDL_GetHaptics(int *count)

Implementation

Pointer<Uint32> sdlGetHaptics(Pointer<Int32> count) {
  final sdlGetHapticsLookupFunction = libSdl3.lookupFunction<
      Pointer<Uint32> Function(Pointer<Int32> count),
      Pointer<Uint32> Function(Pointer<Int32> count)>('SDL_GetHaptics');
  return sdlGetHapticsLookupFunction(count);
}