sdlGetGamepads function gamepad
Get a list of currently connected gamepads.
\param count a pointer filled in with the number of gamepads returned, may be NULL. \returns a 0 terminated array of joystick 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.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.2.0.
\sa SDL_HasGamepad \sa SDL_OpenGamepad
extern SDL_DECLSPEC SDL_JoystickID * SDLCALL SDL_GetGamepads(int *count)
Implementation
Pointer<Uint32> sdlGetGamepads(Pointer<Int32> count) {
final sdlGetGamepadsLookupFunction = _libSdl
.lookupFunction<
Pointer<Uint32> Function(Pointer<Int32> count),
Pointer<Uint32> Function(Pointer<Int32> count)
>('SDL_GetGamepads');
return sdlGetGamepadsLookupFunction(count);
}