getConnectionState method

int getConnectionState()

Get the connection state of a joystick.

\param joystick the joystick to query. \returns the connection state on success or SDL_JOYSTICK_CONNECTION_INVALID on failure; call SDL_GetError() for more information.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetJoystickConnectionState(SDL_Joystick *joystick)

Implementation

int getConnectionState() => sdlGetJoystickConnectionState(this);