The joystick to query.
Where to store the number of hat states in the returned array. This is set to zero if the joystick is not present or an error occurred.
An array of hat states, or NULL if the joystick is not present or an error occurred.
Generated using TypeDoc
This function returns the state of all hats of the specified joystick. Each element in the array is one of the following values:
GLFW_HAT_CENTEREDGLFW_HAT_UPGLFW_HAT_RIGHTGLFW_HAT_DOWNGLFW_HAT_LEFTGLFW_HAT_RIGHT_UPGLFW_HAT_RIGHT|GLFW_HAT_UPGLFW_HAT_RIGHT_DOWNGLFW_HAT_RIGHT|GLFW_HAT_DOWNGLFW_HAT_LEFT_UPGLFW_HAT_LEFT|GLFW_HAT_UPGLFW_HAT_LEFT_DOWNGLFW_HAT_LEFT|GLFW_HAT_DOWNThe diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing it with the corresponding direction.
If the specified joystick is not present this function will return
NULLbut will not generate an error. This can be used instead of first calling glfwJoystickPresent.