summaryrefslogtreecommitdiff
path: root/src/input_common/helpers/stick_from_buttons.cpp
diff options
context:
space:
mode:
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 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:
200 TriggerOnChange(status); 200 TriggerOnChange(status);
201 } 201 }
202 202
203 void ForceUpdate() override{
204 up->ForceUpdate();
205 down->ForceUpdate();
206 left->ForceUpdate();
207 right->ForceUpdate();
208 modifier->ForceUpdate();
209 }
210
211 void SoftUpdate() override {
212 Input::CallbackStatus status{
213 .type = Input::InputType::Stick,
214 .stick_status = GetStatus(),
215 };
216 TriggerOnChange(status);
217 }
218
203 Input::StickStatus GetStatus() const { 219 Input::StickStatus GetStatus() const {
204 Input::StickStatus status{}; 220 Input::StickStatus status{};
205 status.x.properties = properties; 221 status.x.properties = properties;