Merge pull request #12274 from opcon/pr-1

Fix InputEventJoypadMotion::action_match for 0 axis values.
This commit is contained in:
Andreas Haas 2017-10-21 10:27:56 +02:00 committed by GitHub
commit 70a7019807

View File

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