Function SDL_GameControllerGetButton
pub unsafe extern "C" fn SDL_GameControllerGetButton(
gamecontroller: *mut _SDL_GameController,
button: SDL_GameControllerButton,
) -> u8
Available on crate feature
dep_sdl2
only.Expand description
Get the current state of a button on a game controller.
\param gamecontroller a game controller \param button a button index (one of the SDL_GameControllerButton values) \returns 1 for pressed state or 0 for not pressed state or error; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_GameControllerGetAxis