input_interpreter: Fix button hold being interpreted incorrectly on init

We reset all the button states to 0 except the first index (which has all the buttons as pressed) to prevent a button hold being interpreted as a button that was pressed once on the first poll.
This commit is contained in:
Morph 2021-03-20 07:55:59 -04:00
parent f6e6913f8f
commit aa3adf6c3f
2 changed files with 17 additions and 1 deletions

View file

@ -66,6 +66,9 @@ public:
/// Gets a button state from HID and inserts it into the array of button states.
void PollInput();
/// Resets all the button states to their defaults.
void ResetButtonStates();
/**
* Checks whether the button is pressed.
*