Get the current state of a button on a joystick.
Defined in SDL_joystick.h
Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick,int button);
SDL_Joystick * | joystick | an SDL_Joystick structure containing joystick information. |
int | button | the button index to get the state from; indices start at index 0. |
(Uint8) Returns 1 if the specified button is pressed, 0 otherwise.
This function is available since SDL 2.0.0.