Function SDL_GameControllerGetAxis
pub unsafe extern "C" fn SDL_GameControllerGetAxis(
gamecontroller: *mut _SDL_GameController,
axis: SDL_GameControllerAxis,
) -> i16
Available on crate feature
dep_sdl2
only.Expand description
Get the current state of an axis control on a game controller.
The axis indices start at index 0.
The state is a value ranging from -32768 to 32767. Triggers, however, range from 0 to 32767 (they never return a negative value).
\param gamecontroller a game controller \param axis an axis index (one of the SDL_GameControllerAxis values) \returns axis state (including 0) on success or 0 (also) on failure; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_GameControllerGetButton