summaryrefslogtreecommitdiff
path: root/src/core/frontend/input_interpreter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/frontend/input_interpreter.cpp')
-rw-r--r--src/core/frontend/input_interpreter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/frontend/input_interpreter.cpp b/src/core/frontend/input_interpreter.cpp
index 66ae506cd..ec5fe660e 100644
--- a/src/core/frontend/input_interpreter.cpp
+++ b/src/core/frontend/input_interpreter.cpp
@@ -25,6 +25,10 @@ void InputInterpreter::PollInput() {
25 button_states[current_index] = button_state; 25 button_states[current_index] = button_state;
26} 26}
27 27
28bool InputInterpreter::IsButtonPressed(HIDButton button) const {
29 return (button_states[current_index] & (1U << static_cast<u8>(button))) != 0;
30}
31
28bool InputInterpreter::IsButtonPressedOnce(HIDButton button) const { 32bool InputInterpreter::IsButtonPressedOnce(HIDButton button) const {
29 const bool current_press = 33 const bool current_press =
30 (button_states[current_index] & (1U << static_cast<u8>(button))) != 0; 34 (button_states[current_index] & (1U << static_cast<u8>(button))) != 0;