summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/input_default.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 65910b34bc..e9f1eeff6a 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -355,7 +355,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
Ref<InputEventMouseButton> button_event;
button_event.instance();
- button_event->set_device(-1);
+ button_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE);
button_event->set_position(st->get_position());
button_event->set_global_position(st->get_position());
button_event->set_pressed(st->is_pressed());
@@ -384,7 +384,7 @@ void InputDefault::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool
Ref<InputEventMouseMotion> motion_event;
motion_event.instance();
- motion_event->set_device(-1);
+ motion_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE);
motion_event->set_position(sd->get_position());
motion_event->set_global_position(sd->get_position());
motion_event->set_relative(sd->get_relative());
@@ -602,7 +602,7 @@ void InputDefault::ensure_touch_mouse_raised() {
Ref<InputEventMouseButton> button_event;
button_event.instance();
- button_event->set_device(-1);
+ button_event->set_device(InputEvent::DEVICE_ID_TOUCH_MOUSE);
button_event->set_position(mouse_pos);
button_event->set_global_position(mouse_pos);
button_event->set_pressed(false);