pub fn is_button_pressed(joystick: u32, button: u32) -> bool
Expand description

Check if the button is pressed on a given joystick.

If the joystick is not connected, this function returns false.

Arguments

  • joystick - Index of the joystick
  • button - Button to check

Return true if the button is pressed, false otherwise