Browse Source

Merge pull request #12274 from opcon/pr-1

Fix InputEventJoypadMotion::action_match for 0 axis values.
Andreas Haas 8 years ago
parent
commit
70a7019807
1 changed files with 1 additions and 1 deletions
  1. 1 1
      core/os/input_event.cpp

+ 1 - 1
core/os/input_event.cpp

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