aboutsummaryrefslogtreecommitdiff
path: root/src/input_common/helpers/stick_from_buttons.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-24 20:28:54 -0500
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-24 20:30:26 -0600
commitae6ba2c8bd37f4c29ef841f2c1fd6422875df205 (patch)
tree26879cbeb2162e706086818ad501a8f2730206d5 /src/input_common/helpers/stick_from_buttons.cpp
parentc545dca53b65eadb6dd5580a41df0b418bbba7cb (diff)
input_common: Add manual update options to input devices
Diffstat (limited to 'src/input_common/helpers/stick_from_buttons.cpp')
-rw-r--r--src/input_common/helpers/stick_from_buttons.cpp16
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 38f1507462..9101f11cee 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;