glfwSetJoystickUserPointer function
! @brief Sets the user pointer of the specified joystick.
This function sets the user-defined pointer of the specified joystick. The
current value is retained until the joystick is disconnected. The initial
value is NULL
.
This function may be called from the joystick callback, even for a joystick that is being disconnected.
@paramin
jid The joystick whose pointer to set.
@paramin
pointer The new value.
@errors Possible errors include @ref GLFW_NOT_INITIALIZED.
@thread_safety This function may be called from any thread. Access is not synchronized.
@sa @ref joystick_userptr @sa @ref glfwGetJoystickUserPointer
@since Added in version 3.3.
@ingroup input
GLFWAPI void glfwSetJoystickUserPointer(int jid, void* pointer)
Implementation
void glfwSetJoystickUserPointer(int jid, Pointer<Void> pointer) {
final glfwSetJoystickUserPointerLookupFunction = libglfw.lookupFunction<
Void Function(Int32 jid, Pointer<Void> pointer),
void Function(
int jid, Pointer<Void> pointer)>('glfwSetJoystickUserPointer');
return glfwSetJoystickUserPointerLookupFunction(jid, pointer);
}