mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-05 17:36:26 +00:00
[core] Change axisCount to be an array (#3421)
* Update `PLATFORM_DRM` implementation of `GetGamepadAxisCount` * Update * Update `PLATFORM_DRM` implementation of `GetGamepadName` * Add example to test gamepad info functions Fix typo * Update new gamepad info example * Move axis count update out of GamepadThread - race condition * Remove pointless if statement * Start integrating stuff from the mikesinput lib * Add more logging * Add semicolon * Add forgotten static * More fixes * Update axisCount to be array * More debugging * Add forgotten index to ready check * Add path logging * Missing parenthesis * Add missing slash * Fix axis count being reset to 0 * Fix missing paren * Test polling joystick button events * Major updates * Fix missing array index * Fix another missing array index * Update example * dumb logging * Wrong constant for ev.code handling * More dumb logging * Remove some logging * Add FPS to gamepad info example and try for max FPS * tweak * Revert example * Add fps back * Clean up after merge * Switch axisCount to be an array
This commit is contained in:
@@ -1234,7 +1234,7 @@ void PollInputEvents(void)
|
||||
|
||||
// Reset last gamepad button/axis registered state
|
||||
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
||||
CORE.Input.Gamepad.axisCount = 0;
|
||||
//CORE.Input.Gamepad.axisCount = 0;
|
||||
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
|
||||
|
||||
// Register previous keys states
|
||||
@@ -1341,7 +1341,7 @@ void PollInputEvents(void)
|
||||
CORE.Input.Gamepad.currentButtonState[i][GAMEPAD_BUTTON_LEFT_TRIGGER_2] = (char)(CORE.Input.Gamepad.axisState[i][GAMEPAD_AXIS_LEFT_TRIGGER] > 0.1f);
|
||||
CORE.Input.Gamepad.currentButtonState[i][GAMEPAD_BUTTON_RIGHT_TRIGGER_2] = (char)(CORE.Input.Gamepad.axisState[i][GAMEPAD_AXIS_RIGHT_TRIGGER] > 0.1f);
|
||||
|
||||
CORE.Input.Gamepad.axisCount = GLFW_GAMEPAD_AXIS_LAST + 1;
|
||||
CORE.Input.Gamepad.axisCount[i] = GLFW_GAMEPAD_AXIS_LAST + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user