summaryrefslogtreecommitdiff
path: root/core/os
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2016-09-15 19:30:35 +0200
committerAndreas Haas <liu.gam3@gmail.com>2016-09-15 19:30:35 +0200
commit84783fe77b5dfa89a1bcf5a7e60a3b3ab7d876bd (patch)
tree87a659a1b10ec98cb5ed361b9bf5b18f4335f650 /core/os
parent8bcb6a290c61d40333cf3aa73e362836b6e12659 (diff)
Fix input action pressed state not changing for quick joystick movements.
fixes #6488 Also removes a bunch of dead code related to checking if a joystick axis is pressed.
Diffstat (limited to 'core/os')
-rw-r--r--core/os/input_event.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp
index 9d920724e1..9982767be1 100644
--- a/core/os/input_event.cpp
+++ b/core/os/input_event.cpp
@@ -204,7 +204,7 @@ bool InputEvent::is_pressed() const {
case MOUSE_BUTTON: return mouse_button.pressed;
case JOYSTICK_BUTTON: return joy_button.pressed;
case SCREEN_TOUCH: return screen_touch.pressed;
- case JOYSTICK_MOTION: return InputMap::get_singleton()->event_is_joy_motion_action_pressed(*this);
+ case JOYSTICK_MOTION: return ABS(joy_motion.axis_value) > 0.5;
case ACTION: return action.pressed;
default: {}
}