Query whether a gamepad has a given axis.
Defined in <SDL3/SDL_gamepad.h>
bool SDL_GamepadHasAxis(SDL_Gamepad *gamepad, SDL_GamepadAxis axis);
SDL_Gamepad * | gamepad | a gamepad. |
SDL_GamepadAxis | axis | an axis enum value (an SDL_GamepadAxis value). |
(bool) Returns true if the gamepad has this axis, false otherwise.
This merely reports whether the gamepad's mapping defined this axis, as that is all the information SDL has about the physical device.
It is safe to call this function from any thread.
This function is available since SDL 3.2.0.