diff options
author | Hinsbart <liu.gam3@gmail.com> | 2016-04-22 16:36:45 +0200 |
---|---|---|
committer | Hinsbart <liu.gam3@gmail.com> | 2016-04-22 16:36:45 +0200 |
commit | 3b12f9ea8254e6c979e14b6cc5241edbff5c797a (patch) | |
tree | a40baa53e3e1f7b2587f65bf44661c5215617a82 | |
parent | c0ec7e933ac6b6419e564b276b49c8d9a6d03f30 (diff) |
add sign comparison for joystick axis events in InputMap::_find_event
fixes #4400
-rw-r--r-- | core/input_map.cpp | 2 |
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; } |