summaryrefslogtreecommitdiffstats
path: root/src/input_common/input_poller.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-25 03:28:54 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:26 +0100
commitc6c32daf40ae1c720f0a2897c538bb1117371ea5 (patch)
tree26879cbeb2162e706086818ad501a8f2730206d5 /src/input_common/input_poller.cpp
parentservice/hid: Fix memory allocated incorrectly (diff)
downloadyuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.tar
yuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.tar.gz
yuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.tar.bz2
yuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.tar.lz
yuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.tar.xz
yuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.tar.zst
yuzu-c6c32daf40ae1c720f0a2897c538bb1117371ea5.zip
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,