Work on fixing compile.

This commit is contained in:
Relintai 2023-01-09 01:18:02 +01:00
parent a5d8af46bb
commit 472e7fd7ba
2 changed files with 6 additions and 6 deletions

View File

@ -203,7 +203,7 @@ void InputMapEditor::_device_input_add() {
case INPUT_MOUSE_BUTTON: { case INPUT_MOUSE_BUTTON: {
Ref<InputEventMouseButton> mb; Ref<InputEventMouseButton> mb;
#if VERSION_MAJOR < 4 #if VERSION_MAJOR < 4
mb.instance(); mb.instantiate();
mb->set_button_index(device_index->get_selected() + 1); mb->set_button_index(device_index->get_selected() + 1);
#else #else
mb.instantiate(); mb.instantiate();
@ -226,7 +226,7 @@ void InputMapEditor::_device_input_add() {
case INPUT_JOY_MOTION: { case INPUT_JOY_MOTION: {
Ref<InputEventJoypadMotion> jm; Ref<InputEventJoypadMotion> jm;
#if VERSION_MAJOR < 4 #if VERSION_MAJOR < 4
jm.instance(); jm.instantiate();
jm->set_axis(device_index->get_selected() >> 1); jm->set_axis(device_index->get_selected() >> 1);
#else #else
jm.instantiate(); jm.instantiate();
@ -251,7 +251,7 @@ void InputMapEditor::_device_input_add() {
case INPUT_JOY_BUTTON: { case INPUT_JOY_BUTTON: {
Ref<InputEventJoypadButton> jb; Ref<InputEventJoypadButton> jb;
#if VERSION_MAJOR < 4 #if VERSION_MAJOR < 4
jb.instance(); jb.instantiate();
jb->set_button_index(device_index->get_selected()); jb->set_button_index(device_index->get_selected());
#else #else
jb.instantiate(); jb.instantiate();
@ -310,7 +310,7 @@ void InputMapEditor::_press_a_key_confirm() {
Ref<BSInputEventKey> ie; Ref<BSInputEventKey> ie;
#if VERSION_MAJOR < 4 #if VERSION_MAJOR < 4
ie.instance(); ie.instantiate();
ie->set_scancode(last_wait_for_key->get_scancode()); ie->set_scancode(last_wait_for_key->get_scancode());
ie->set_shift(last_wait_for_key->get_shift()); ie->set_shift(last_wait_for_key->get_shift());
ie->set_alt(last_wait_for_key->get_alt()); ie->set_alt(last_wait_for_key->get_alt());

View File

@ -65,7 +65,7 @@ void TouchButton::_input(Ref<InputEvent> p_event) {
Ref<InputEventMouseButton> ev; Ref<InputEventMouseButton> ev;
#if VERSION_MAJOR < 4 #if VERSION_MAJOR < 4
ev.instance(); ev.instantiate();
#else #else
ev.instantiate(); ev.instantiate();
#endif #endif
@ -89,7 +89,7 @@ void TouchButton::_input(Ref<InputEvent> p_event) {
if (mm.is_valid() && _is_point_inside(mm->get_position())) { if (mm.is_valid() && _is_point_inside(mm->get_position())) {
Ref<InputEventMouseMotion> ev; Ref<InputEventMouseMotion> ev;
ev.instance(); ev.instantiate();
ev->set_relative(mm->get_relative()); ev->set_relative(mm->get_relative());
ev->set_speed(mm->get_speed()); ev->set_speed(mm->get_speed());