SDL_GetJoystickAxisInitialState(3)

SDL_GetJoystickAxisInitialState3

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

Usage

#include "SDL3/SDL.h"

bool SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state);

Header file

Defined in SDL3/SDL_joystick.h

Overview

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.

From libsdl3-doc 3.2.10+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.