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 /core | |
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 'core')
-rw-r--r-- | core/os/input_event.cpp | 3 | ||||
-rw-r--r-- | core/os/input_event.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/core/os/input_event.cpp b/core/os/input_event.cpp index 40308f4f7d..25a5c2afeb 100644 --- a/core/os/input_event.cpp +++ b/core/os/input_event.cpp @@ -33,6 +33,9 @@ #include "core/input_map.h" #include "core/os/keyboard.h" +const int InputEvent::DEVICE_ID_TOUCH_MOUSE = -1; +const int InputEvent::DEVICE_ID_INTERNAL = -2; + void InputEvent::set_device(int p_device) { device = p_device; } diff --git a/core/os/input_event.h b/core/os/input_event.h index 47f9293a7f..ba01516519 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -165,6 +165,9 @@ protected: static void _bind_methods(); public: + static const int DEVICE_ID_TOUCH_MOUSE; + static const int DEVICE_ID_INTERNAL; + void set_device(int p_device); int get_device() const; |