glfwSetJoystickUserPointer

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.

extern (C) @nogc nothrow __gshared
void
glfwSetJoystickUserPointer
(
int jid
,
void* pointer
)

Parameters

jid int

The joystick whose pointer to set.

pointer void*

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

Meta

Since

Added in version 3.3.

Ingroup: input