The UTF-8 encoded GUID of the joystick, or null if the joystick is not present or an error occurred.
Errors: Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_INVALID_ENUM and @ref GLFW_PLATFORM_ERROR.
The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified joystick is disconnected or the library is terminated.
This function must only be called from the main thread.
@sa @ref gamepad
Added in version 3.3.
Ingroup: input
Returns the SDL compatible GUID of the specified joystick.
This function returns the SDL compatible GUID, as a UTF-8 encoded hexadecimal string, of the specified joystick. The returned string is allocated and freed by GLFW. You should not free it yourself.
The GUID is what connects a joystick to a gamepad mapping. A connected joystick will always have a GUID even if there is no gamepad mapping assigned to it.
If the specified joystick is not present this function will return null but will not generate an error. This can be used instead of first calling @ref glfwJoystickPresent.
The GUID uses the format introduced in SDL 2.0.5. This GUID tries to uniquely identify the make and model of a joystick but does not identify a specific unit, e.g. all wired Xbox 360 controllers will have the same GUID on that platform. The GUID for a unit may vary between platforms depending on what hardware information the platform specific APIs provide.