input_common: Add manual update options to input devices

This commit is contained in:
german77 2021-10-24 20:28:54 -05:00 committed by Narr the Reg
parent f01dac3bf9
commit c6c32daf40
5 changed files with 56 additions and 0 deletions

View file

@ -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;