glfwGetGamepadButtons¶
Returns the state of the specified gamepad's buttons.
If the gamepad is not present, or the given joystick is not a gamepad, this function will return an empty array.
The returned array is indexed by the GLFW gamepad button constants:
- GLFW_GAMEPAD_BUTTON_A
- GLFW_GAMEPAD_BUTTON_B
- GLFW_GAMEPAD_BUTTON_X
- GLFW_GAMEPAD_BUTTON_Y
- GLFW_GAMEPAD_BUTTON_LEFT_BUMPER
- GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER
- GLFW_GAMEPAD_BUTTON_BACK
- GLFW_GAMEPAD_BUTTON_START
- GLFW_GAMEPAD_BUTTON_GUIDE
- GLFW_GAMEPAD_BUTTON_LEFT_THUMB
- GLFW_GAMEPAD_BUTTON_RIGHT_THUMB
- GLFW_GAMEPAD_BUTTON_DPAD_UP
- GLFW_GAMEPAD_BUTTON_DPAD_RIGHT
- GLFW_GAMEPAD_BUTTON_DPAD_DOWN
- GLFW_GAMEPAD_BUTTON_DPAD_LEFT
- arguments
-
int
$joystick
The joystick to query.
- returns
-
array