Scroll to navigation

SDL_GetJoystickAxisInitialState(3) SDL3 FUNCTIONS SDL_GetJoystickAxisInitialState(3)

NAME

SDL_GetJoystickAxisInitialState - Get the initial state of an axis control on a joystick.

SYNOPSIS

#include "SDL3/SDL.h"
SDL_bool SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state);

DESCRIPTION

The state is a value ranging from -32768 to 32767.

The axis indices start at index 0.

FUNCTION PARAMETERS

an SDL_Joystick
structure containing joystick information
the axis to query; the axis indices start at index 0
Upon return, the initial value is supplied here.

RETURN VALUE

Returns SDL_TRUE
if this axis has any initial value, or

SDL_FALSE
if not.

AVAILABILITY

This function is available since SDL 3.0.0.

SDL 3.1.0 SDL