Function SDL_JoystickGetButton

pub unsafe extern "C" fn SDL_JoystickGetButton(
    joystick: *mut _SDL_Joystick,
    button: i32,
) -> u8
Available on crate feature dep_sdl2 only.
Expand description

Get the current state of a button on a joystick.

\param joystick an SDL_Joystick structure containing joystick information \param button the button index to get the state from; indices start at index 0 \returns 1 if the specified button is pressed, 0 otherwise.

\since This function is available since SDL 2.0.0.

\sa SDL_JoystickNumButtons