Code gardening
This commit is contained in:
parent
99b61089c8
commit
7711de62fb
1 changed files with 40 additions and 45 deletions
|
|
@ -1086,7 +1086,7 @@ void PollInputEvents(void)
|
|||
CORE.Input.Keyboard.charPressedQueueCount = 0;
|
||||
|
||||
// Reset last gamepad button/axis registered state
|
||||
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
||||
CORE.Input.Gamepad.lastButtonPressed = 0; // GAMEPAD_BUTTON_UNKNOWN
|
||||
//CORE.Input.Gamepad.axisCount = 0;
|
||||
|
||||
// Keyboard/Mouse input polling (automatically managed by GLFW3 through callback)
|
||||
|
|
@ -1128,7 +1128,7 @@ void PollInputEvents(void)
|
|||
// Register previous gamepad button states
|
||||
for (int k = 0; k < MAX_GAMEPAD_BUTTONS; k++) CORE.Input.Gamepad.previousButtonState[i][k] = CORE.Input.Gamepad.currentButtonState[i][k];
|
||||
|
||||
EmscriptenGamepadEvent gamepadState;
|
||||
EmscriptenGamepadEvent gamepadState = { 0 };
|
||||
|
||||
int result = emscripten_get_gamepad_status(i, &gamepadState);
|
||||
|
||||
|
|
@ -1161,7 +1161,7 @@ void PollInputEvents(void)
|
|||
default: break;
|
||||
}
|
||||
|
||||
if (button + 1 != 0) // Check for valid button
|
||||
if (button + 1 != 0) // Check for valid button
|
||||
{
|
||||
if (gamepadState.digitalButton[j] == 1)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue