From fdf58a585839804c89798392dd93025dbe8654e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 28 Apr 2020 15:19:37 +0200 Subject: Rename InputFilter back to Input It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690. --- scene/3d/xr_nodes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scene/3d') diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 0373114e7d..6f41629bac 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -29,7 +29,7 @@ /*************************************************************************/ #include "xr_nodes.h" -#include "core/input/input_filter.h" +#include "core/input/input.h" #include "servers/xr/xr_interface.h" #include "servers/xr_server.h" @@ -206,7 +206,7 @@ void XRController3D::_notification(int p_what) { // check button states for (int i = 0; i < 16; i++) { bool was_pressed = (button_states & mask) == mask; - bool is_pressed = InputFilter::get_singleton()->is_joy_button_pressed(joy_id, i); + bool is_pressed = Input::get_singleton()->is_joy_button_pressed(joy_id, i); if (!was_pressed && is_pressed) { emit_signal("button_pressed", i); @@ -306,7 +306,7 @@ bool XRController3D::is_button_pressed(int p_button) const { return false; }; - return InputFilter::get_singleton()->is_joy_button_pressed(joy_id, p_button); + return Input::get_singleton()->is_joy_button_pressed(joy_id, p_button); }; float XRController3D::get_joystick_axis(int p_axis) const { @@ -315,7 +315,7 @@ float XRController3D::get_joystick_axis(int p_axis) const { return 0.0; }; - return InputFilter::get_singleton()->get_joy_axis(joy_id, p_axis); + return Input::get_singleton()->get_joy_axis(joy_id, p_axis); }; real_t XRController3D::get_rumble() const { -- cgit v1.2.3