sdlGetJoystickAxisInitialState function
bool
sdlGetJoystickAxisInitialState(
- Pointer<
SdlJoystick> joystick, - int axis,
- Pointer<
Int16> state
Get the initial state of an axis control on a joystick.
The state is a value ranging from -32768 to 32767.
The axis indices start at index 0.
\param joystick an SDL_Joystick structure containing joystick information. \param axis the axis to query; the axis indices start at index 0. \param state upon return, the initial value is supplied here. \returns true if this axis has any initial value, or false if not.
\since This function is available since SDL 3.1.3.
extern SDL_DECLSPEC bool SDLCALL SDL_GetJoystickAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)
Implementation
bool sdlGetJoystickAxisInitialState(
Pointer<SdlJoystick> joystick, int axis, Pointer<Int16> state) {
final sdlGetJoystickAxisInitialStateLookupFunction = libSdl3.lookupFunction<
Uint8 Function(
Pointer<SdlJoystick> joystick, Int32 axis, Pointer<Int16> state),
int Function(Pointer<SdlJoystick> joystick, int axis,
Pointer<Int16> state)>('SDL_GetJoystickAxisInitialState');
return sdlGetJoystickAxisInitialStateLookupFunction(joystick, axis, state) ==
1;
}