add bindings to query gamepad's face buttons

This commit is contained in:
2026-01-20 04:19:26 +00:00
parent 6f89fbc89c
commit f2bffc4b6b
2 changed files with 38 additions and 0 deletions

View File

@@ -66,3 +66,27 @@ float getLeftJoystickYAxisState() {
return 99.0;
}
}
int isCrossButtonPressed() {
return state.buttons[GLFW_GAMEPAD_BUTTON_CROSS];
}
int isCircleButtonPressed() {
return state.buttons[GLFW_GAMEPAD_BUTTON_CIRCLE];
}
int isSquareButtonPressed() {
return state.buttons[GLFW_GAMEPAD_BUTTON_SQUARE];
}
int isTriangleButtonPressed() {
return state.buttons[GLFW_GAMEPAD_BUTTON_TRIANGLE];
}
int isR1ButtonPressed() {
return state.buttons[GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER];
}
int isL1ButtonPressed() {
return state.buttons[GLFW_GAMEPAD_BUTTON_LEFT_BUMPER];
}