summaryrefslogtreecommitdiff
path: root/modules/gdnative/xr
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-04-28 15:19:37 +0200
committerRémi Verschelde <rverschelde@gmail.com>2020-04-28 15:19:49 +0200
commitfdf58a585839804c89798392dd93025dbe8654e4 (patch)
tree7e5fa3980a90d34d2f89f2b6c9adc392e890eeb6 /modules/gdnative/xr
parent39f7a4092533a600eeada6638016af8bd4bd2271 (diff)
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.
Diffstat (limited to 'modules/gdnative/xr')
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/gdnative/xr/xr_interface_gdnative.cpp b/modules/gdnative/xr/xr_interface_gdnative.cpp
index 0451945139..d65089a123 100644
--- a/modules/gdnative/xr/xr_interface_gdnative.cpp
+++ b/modules/gdnative/xr/xr_interface_gdnative.cpp
@@ -29,7 +29,7 @@
/*************************************************************************/
#include "xr_interface_gdnative.h"
-#include "core/input/input_filter.h"
+#include "core/input/input.h"
#include "servers/rendering/rendering_server_globals.h"
#include "servers/xr/xr_positional_tracker.h"
@@ -306,7 +306,7 @@ godot_int GDAPI godot_xr_add_controller(char *p_device_name, godot_int p_hand, g
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, 0);
- InputFilter *input = InputFilter::get_singleton();
+ Input *input = Input::get_singleton();
ERR_FAIL_NULL_V(input, 0);
XRPositionalTracker *new_tracker = memnew(XRPositionalTracker);
@@ -345,7 +345,7 @@ void GDAPI godot_xr_remove_controller(godot_int p_controller_id) {
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);
- InputFilter *input = InputFilter::get_singleton();
+ Input *input = Input::get_singleton();
ERR_FAIL_NULL(input);
XRPositionalTracker *remove_tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
@@ -383,7 +383,7 @@ void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);
- InputFilter *input = InputFilter::get_singleton();
+ Input *input = Input::get_singleton();
ERR_FAIL_NULL(input);
XRPositionalTracker *tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
@@ -399,14 +399,14 @@ void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_a
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL(xr_server);
- InputFilter *input = InputFilter::get_singleton();
+ Input *input = Input::get_singleton();
ERR_FAIL_NULL(input);
XRPositionalTracker *tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
if (tracker != nullptr) {
int joyid = tracker->get_joy_id();
if (joyid != -1) {
- InputFilter::JoyAxis jx;
+ Input::JoyAxis jx;
jx.min = p_can_be_negative ? -1 : 0;
jx.value = p_value;
input->joy_axis(joyid, p_axis, jx);