diff --git a/core/input/input.cpp b/core/input/input.cpp index 071d9ba6482..c04fc894c8b 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -231,14 +231,17 @@ Input::VelocityTrack::VelocityTrack() { bool Input::is_anything_pressed() const { _THREAD_SAFE_METHOD_ + if (!keys_pressed.is_empty() || !joy_buttons_pressed.is_empty() || !mouse_button_mask.is_empty()) { + return true; + } + for (const KeyValue &E : action_state) { if (E.value.pressed) { return true; } } - return !keys_pressed.is_empty() || - !joy_buttons_pressed.is_empty() || - !mouse_button_mask.is_empty(); + + return false; } bool Input::is_key_pressed(Key p_keycode) const {