diff options
| author | 2021-03-20 07:55:59 -0400 | |
|---|---|---|
| committer | 2021-04-15 01:53:17 -0400 | |
| commit | aa3adf6c3fc20171abcbd2678ed7ad6b3bd21a8e (patch) | |
| tree | d81c7856c62646ed24a29360ad183731369592b9 /src/core/frontend/input_interpreter.h | |
| parent | qt_themes: Add styles for the On-Screen Keyboard and OverlayDialog (diff) | |
| download | yuzu-aa3adf6c3fc20171abcbd2678ed7ad6b3bd21a8e.tar.gz yuzu-aa3adf6c3fc20171abcbd2678ed7ad6b3bd21a8e.tar.xz yuzu-aa3adf6c3fc20171abcbd2678ed7ad6b3bd21a8e.zip | |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
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: | |||
| 66 | /// Gets a button state from HID and inserts it into the array of button states. | 66 | /// Gets a button state from HID and inserts it into the array of button states. |
| 67 | void PollInput(); | 67 | void PollInput(); |
| 68 | 68 | ||
| 69 | /// Resets all the button states to their defaults. | ||
| 70 | void ResetButtonStates(); | ||
| 71 | |||
| 69 | /** | 72 | /** |
| 70 | * Checks whether the button is pressed. | 73 | * Checks whether the button is pressed. |
| 71 | * | 74 | * |