summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHinsbart <liu.gam3@gmail.com>2016-04-22 16:36:45 +0200
committerHinsbart <liu.gam3@gmail.com>2016-04-22 16:36:45 +0200
commit3b12f9ea8254e6c979e14b6cc5241edbff5c797a (patch)
treea40baa53e3e1f7b2587f65bf44661c5215617a82
parentc0ec7e933ac6b6419e564b276b49c8d9a6d03f30 (diff)
add sign comparison for joystick axis events in InputMap::_find_event
fixes #4400
-rw-r--r--core/input_map.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/input_map.cpp b/core/input_map.cpp
index 5a9b035771..17e98902a1 100644
--- a/core/input_map.cpp
+++ b/core/input_map.cpp
@@ -106,7 +106,7 @@ List<InputEvent>::Element *InputMap::_find_event(List<InputEvent> &p_list,const
} break;
case InputEvent::JOYSTICK_MOTION: {
- same=(e.joy_motion.axis==p_event.joy_motion.axis);
+ same=(e.joy_motion.axis==p_event.joy_motion.axis && (e.joy_motion.axis_value < 0) == (p_event.joy_motion.axis_value < 0));
} break;
}