Function SDL_GetJoystickButton
pub unsafe extern "C" fn SDL_GetJoystickButton(
joystick: *mut SDL_Joystick,
button: i32,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Get the current state of a button on a joystick.
§Parameters
joystick
: anSDL_Joystick
structure containing joystick information.button
: the button index to get the state from; indices start at index 0.
§Return value
Returns true if the button is pressed, false otherwise.
§Availability
This function is available since SDL 3.2.0.