glfwJoystickPresent

Returns whether the specified joystick is present.

This function returns whether the specified joystick is present.

There is no need to call this function before other functions that accept a joystick ID, as they all check for presence before performing any other work.

extern (C) @nogc nothrow __gshared
int
glfwJoystickPresent
(
int jid
)

Parameters

jid int

The joystick to query.

Return Value

Type: int

GLFW_TRUE if the joystick is present, or GLFW_FALSE otherwise.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.

Thread Safety

This function must only be called from the main thread.

@sa @ref joystick

Meta

Since

Added in version 3.0. Replaces glfwGetJoystickParam.

Ingroup: input