sdlJoystickGetAxisInitialState function
bool
sdlJoystickGetAxisInitialState(
- 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. \return SDL_TRUE if this axis has any initial value, or SDL_FALSE if not.
\since This function is available since SDL 2.0.6.
extern DECLSPEC SDL_bool SDLCALL SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)
Implementation
bool sdlJoystickGetAxisInitialState(
Pointer<SdlJoystick> joystick, int axis, Pointer<Int16> state) {
final sdlJoystickGetAxisInitialStateLookupFunction = libSdl2.lookupFunction<
Int32 Function(
Pointer<SdlJoystick> joystick, Int32 axis, Pointer<Int16> state),
int Function(Pointer<SdlJoystick> joystick, int axis,
Pointer<Int16> state)>('SDL_JoystickGetAxisInitialState');
return sdlJoystickGetAxisInitialStateLookupFunction(joystick, axis, state) ==
1;
}