From aa3adf6c3fc20171abcbd2678ed7ad6b3bd21a8e Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Sat, 20 Mar 2021 07:55:59 -0400 Subject: 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. --- src/core/frontend/input_interpreter.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/frontend/input_interpreter.h') diff --git a/src/core/frontend/input_interpreter.h b/src/core/frontend/input_interpreter.h index 73fc47ffb..9495e3daf 100644 --- a/src/core/frontend/input_interpreter.h +++ b/src/core/frontend/input_interpreter.h @@ -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. * -- cgit v1.2.3