glfwGetJoystickButtons¶
Returns the state of all buttons of the specified joystick.
This function returns the state of all buttons of the specified joystick.
Each element in the array is either GLFW_PRESS
or GLFW_RELEASE
.
For backward compatibility with earlier versions that did not have @ref glfwGetJoystickHats, the button array also includes all hats, each represented as four buttons. The hats are in the same order as returned by glfwGetJoystickHats and are in the order up, right, down and left. To disable these extra buttons, set the @ref GLFW_JOYSTICK_HAT_BUTTONS init hint before initialization.
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
glfwJoystickPresent
.
- arguments
-
int
$jid
Thejoystick
to query.
- returns
-
array