diff options
author | Aaron Franke <arnfranke@yahoo.com> | 2021-03-25 16:56:12 -0400 |
---|---|---|
committer | Aaron Franke <arnfranke@yahoo.com> | 2021-06-20 11:54:24 -0400 |
commit | 0ce49800acf464c2242c3f7e021b4ab8f49ec366 (patch) | |
tree | ba1b10099dfbaf9798a16f619493a49a37701dbc /scene/3d | |
parent | e919d894f84ea86ee43a3e1b8a675b9fec28f01c (diff) |
Use mouse and joypad enums instead of plain integers
Also MIDIMessage
Diffstat (limited to 'scene/3d')
-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 { |