浏览代码

Merge pull request #12274 from opcon/pr-1

Fix InputEventJoypadMotion::action_match for 0 axis values.
Andreas Haas 8 年之前
父节点
当前提交
70a7019807
共有 1 个文件被更改,包括 1 次插入1 次删除
  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())
 	if (jm.is_null())
 		return false;
 		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 {
 String InputEventJoypadMotion::as_text() const {