###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!) # SDL_GetJoystickAxisInitialState Get the initial state of an axis control on a joystick. ## Header File Defined in [](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_joystick.h) ## Syntax ```c SDL_bool SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state); ``` ## Function Parameters | | | | | ------------------------------ | ------------ | -------------------------------------------------------------------------- | | [SDL_Joystick](SDL_Joystick) * | **joystick** | an [SDL_Joystick](SDL_Joystick) structure containing joystick information. | | int | **axis** | the axis to query; the axis indices start at index 0. | | Sint16 * | **state** | upon return, the initial value is supplied here. | ## Return Value ([SDL_bool](SDL_bool)) Returns [SDL_TRUE](SDL_TRUE) if this axis has any initial value, or [SDL_FALSE](SDL_FALSE) if not. ## Remarks The state is a value ranging from -32768 to 32767. The axis indices start at index 0. ## Version This function is available since SDL 3.0.0. ---- [CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction), [CategoryJoystick](CategoryJoystick)