diff options
author | german77 <juangerman-13@hotmail.com> | 2021-10-25 03:28:54 +0200 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2021-11-25 03:30:26 +0100 |
commit | c6c32daf40ae1c720f0a2897c538bb1117371ea5 (patch) | |
tree | 26879cbeb2162e706086818ad501a8f2730206d5 /src/input_common/helpers/stick_from_buttons.cpp | |
parent | service/hid: Fix memory allocated incorrectly (diff) | |
download | yuzu-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/helpers/stick_from_buttons.cpp')
-rw-r--r-- | src/input_common/helpers/stick_from_buttons.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/input_common/helpers/stick_from_buttons.cpp b/src/input_common/helpers/stick_from_buttons.cpp index 38f150746..9101f11ce 100644 --- a/src/input_common/helpers/stick_from_buttons.cpp +++ b/src/input_common/helpers/stick_from_buttons.cpp @@ -200,6 +200,22 @@ public: TriggerOnChange(status); } + void ForceUpdate() override{ + up->ForceUpdate(); + down->ForceUpdate(); + left->ForceUpdate(); + right->ForceUpdate(); + modifier->ForceUpdate(); + } + + void SoftUpdate() override { + Input::CallbackStatus status{ + .type = Input::InputType::Stick, + .stick_status = GetStatus(), + }; + TriggerOnChange(status); + } + Input::StickStatus GetStatus() const { Input::StickStatus status{}; status.x.properties = properties; |