---
name: "SDL_GetJoystickAxisInitialState"
section: "3"
platform: "linux"
package: "libsdl3-doc"
version: "3.2.10+ds-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_GetJoystickAxisInitialState"
---

# SDL\_GetJoystickAxisInitialState(3)

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

## NAME

SDL\_GetJoystickAxisInitialState - Get the initial state of an axis control on a joystick.

## HEADER FILE

Defined in SDL3/SDL\_joystick.h

## SYNOPSIS

```
#include "SDL3/SDL.h"
```

**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

- *joystick*

  an  **SDL\_Joystick**\
    structure containing joystick information.

- *axis*

  the axis to query; the axis indices start at index 0.

- *state*

  upon return, the initial value is supplied here.

## RETURN VALUE

Returns true if this axis has any initial value, or false if not.

## AVAILABILITY

This function is available since SDL 3.2.0.
