diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-20 18:50:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-20 18:50:40 +0200 |
commit | 50a0a401a10dda9718169d690b4b941100eb4a2c (patch) | |
tree | ba1b10099dfbaf9798a16f619493a49a37701dbc /scene/3d/xr_nodes.cpp | |
parent | 1acc76fecc9e613724c920633af6bae059444030 (diff) | |
parent | 0ce49800acf464c2242c3f7e021b4ab8f49ec366 (diff) |
Merge pull request #49281 from aaronfranke/use-enums-mouse-joypad
Diffstat (limited to 'scene/3d/xr_nodes.cpp')
-rw-r--r-- | scene/3d/xr_nodes.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/3d/xr_nodes.cpp b/scene/3d/xr_nodes.cpp index 4f2c816934..a91e712b0b 100644 --- a/scene/3d/xr_nodes.cpp +++ b/scene/3d/xr_nodes.cpp @@ -204,7 +204,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 = Input::get_singleton()->is_joy_button_pressed(joy_id, i); + bool is_pressed = Input::get_singleton()->is_joy_button_pressed(joy_id, (JoyButton)i); if (!was_pressed && is_pressed) { emit_signal("button_pressed", i); @@ -304,7 +304,7 @@ bool XRController3D::is_button_pressed(int p_button) const { return false; }; - return Input::get_singleton()->is_joy_button_pressed(joy_id, p_button); + return Input::get_singleton()->is_joy_button_pressed(joy_id, (JoyButton)p_button); }; float XRController3D::get_joystick_axis(int p_axis) const { @@ -313,7 +313,7 @@ float XRController3D::get_joystick_axis(int p_axis) const { return 0.0; }; - return Input::get_singleton()->get_joy_axis(joy_id, p_axis); + return Input::get_singleton()->get_joy_axis(joy_id, (JoyAxis)p_axis); }; real_t XRController3D::get_rumble() const { |