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 c545dca53b
commit ae6ba2c8bd
5 changed files with 56 additions and 0 deletions

View file

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