SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_GetJoystickAxisInitialState

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

Header File

Defined in <SDL3/SDL_joystick.h>

Syntax

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

Function Parameters

SDL_Joystick * joystick an 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

(bool) Returns true if this axis has any initial value, or 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.1.3.


CategoryAPI, CategoryAPIFunction, CategoryJoystick


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.