summaryrefslogtreecommitdiffstats
path: root/src/input_common/input_poller.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_common/input_poller.cpp')
-rw-r--r--src/input_common/input_poller.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/input_common/input_poller.cpp b/src/input_common/input_poller.cpp
index 62ade951c..024bd28ef 100644
--- a/src/input_common/input_poller.cpp
+++ b/src/input_common/input_poller.cpp
@@ -45,6 +45,16 @@ public:
};
}
+ void ForceUpdate() {
+ const Input::CallbackStatus status{
+ .type = Input::InputType::Button,
+ .button_status = GetStatus(),
+ };
+
+ last_button_value = status.button_status.value;
+ TriggerOnChange(status);
+ }
+
void OnChange() {
const Input::CallbackStatus status{
.type = Input::InputType::Button,
@@ -96,6 +106,16 @@ public:
};
}
+ void ForceUpdate() {
+ const Input::CallbackStatus status{
+ .type = Input::InputType::Button,
+ .button_status = GetStatus(),
+ };
+
+ last_button_value = status.button_status.value;
+ TriggerOnChange(status);
+ }
+
void OnChange() {
const Input::CallbackStatus status{
.type = Input::InputType::Button,