diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-03-09 22:40:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-09 22:40:53 +0100 |
commit | bba854bac67a70757e325d9f06bf63fab5519d9e (patch) | |
tree | 406d6a5ee15e9e19fe46aedb89d8f06bc3add64d /main | |
parent | 86c5f31dd51ad1923b6ff5aef4138031656fb4ad (diff) | |
parent | f757460ec819aeb2a9d1c21e3ba02b4925f0cac2 (diff) |
Merge pull request #26851 from RandomShaper/fix-26460-fake-event-flood
Fix fake null-motion mouse event flood
Diffstat (limited to 'main')
-rw-r--r-- | main/input_default.cpp | 6 |
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); |