Function SDL_GamepadHasButton
pub unsafe extern "C" fn SDL_GamepadHasButton(
gamepad: *mut SDL_Gamepad,
button: SDL_GamepadButton,
) -> bool
Available on crate feature
dep_sdl3
only.Expand description
Query whether a gamepad has a given button.
This merely reports whether the gamepad’s mapping defined this button, as that is all the information SDL has about the physical device.
§Parameters
gamepad
: a gamepad.button
: a button enum value (anSDL_GamepadButton
value).
§Return value
Returns true if the gamepad has this button, false otherwise.
§Availability
This function is available since SDL 3.2.0.