Function sdl2_sys::SDL_JoystickGetButton
source ยท pub unsafe extern "C" fn SDL_JoystickGetButton(
joystick: *mut SDL_Joystick,
button: c_int,
) -> Uint8
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