sdlGetHaptics function haptic

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.2.0.

\sa SDL_OpenHaptic

extern SDL_DECLSPEC SDL_HapticID * SDLCALL SDL_GetHaptics(int *count)

Implementation

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