sdlGetJoystickConnectionState function

int sdlGetJoystickConnectionState(
  1. Pointer<SdlJoystick> joystick
)

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.

\since This function is available since SDL 3.1.3.

extern SDL_DECLSPEC SDL_JoystickConnectionState SDLCALL SDL_GetJoystickConnectionState(SDL_Joystick *joystick)

Implementation

int sdlGetJoystickConnectionState(Pointer<SdlJoystick> joystick) {
  final sdlGetJoystickConnectionStateLookupFunction = libSdl3.lookupFunction<
      Int32 Function(Pointer<SdlJoystick> joystick),
      int Function(
          Pointer<SdlJoystick> joystick)>('SDL_GetJoystickConnectionState');
  return sdlGetJoystickConnectionStateLookupFunction(joystick);
}