diff options
Diffstat (limited to 'core/os/input_event.cpp')
-rw-r--r-- | core/os/input_event.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index bdb61cbfd9..5003be77ab 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -656,10 +656,10 @@ bool InputEventJoypadMotion::action_match(const Ref<InputEvent> &p_event, bool * if (jm.is_null()) return false; - bool match = (axis == jm->axis && ((axis_value < 0) == (jm->axis_value < 0) || jm->axis_value == 0)); + bool match = (axis == jm->axis && (((axis_value < 0) == (jm->axis_value < 0)) || jm->axis_value == 0)); if (match) { if (p_pressed != NULL) - *p_pressed = Math::abs(jm->get_axis_value() >= p_deadzone); + *p_pressed = Math::abs(jm->get_axis_value()) >= p_deadzone; if (p_strength != NULL) *p_strength = (*p_pressed) ? Math::inverse_lerp(p_deadzone, 1.0f, Math::abs(jm->get_axis_value())) : 0.0f; } |