aboutsummaryrefslogtreecommitdiff
path: root/src/core/frontend/input_interpreter.h
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-03-20 07:55:59 -0400
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-04-15 01:53:17 -0400
commitaa3adf6c3fc20171abcbd2678ed7ad6b3bd21a8e (patch)
treed81c7856c62646ed24a29360ad183731369592b9 /src/core/frontend/input_interpreter.h
parentf6e6913f8ff5f533e69a5831a81ca8f15f709baf (diff)
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.
Diffstat (limited to 'src/core/frontend/input_interpreter.h')
-rw-r--r--src/core/frontend/input_interpreter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/frontend/input_interpreter.h b/src/core/frontend/input_interpreter.h
index 73fc47ffbf..9495e3daf0 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.
*