Merge pull request #12274 from opcon/pr-1
Fix InputEventJoypadMotion::action_match for 0 axis values.
This commit is contained in:
commit
70a7019807
@ -637,7 +637,7 @@ bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event) const
|
||||
if (jm.is_null())
|
||||
return false;
|
||||
|
||||
return (axis == jm->axis && (axis_value < 0) == (jm->axis_value < 0));
|
||||
return (axis == jm->axis && ((axis_value < 0) == (jm->axis_value < 0) || jm->axis_value == 0));
|
||||
}
|
||||
|
||||
String InputEventJoypadMotion::as_text() const {
|
||||
|
Loading…
Reference in New Issue
Block a user