glfwJoystickPresent function
! @brief 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.
@paramin
jid The joystick
(@ref joysticks) to query.
@return 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
@since Added in version 3.0. Replaces glfwGetJoystickParam
.
@ingroup input
GLFWAPI int glfwJoystickPresent(int jid)
Implementation
int glfwJoystickPresent(int jid) {
final glfwJoystickPresentLookupFunction =
libglfw.lookupFunction<Int32 Function(Int32 jid), int Function(int jid)>(
'glfwJoystickPresent');
return glfwJoystickPresentLookupFunction(jid);
}