1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Fix mouse/drag/touch InputEvents having no device id

Some internally created emulated/instantiated events didn't have a
device id. This PR sets for these cases a device id.

Also rename `DEVICE_ID_TOUCH_MOUSE` to the more generic
`DEVICE_ID_EMULATION`.
This commit is contained in:
Markus Sauermann
2023-02-04 23:16:54 +01:00
parent 945207885b
commit 8748f4dcaa
5 changed files with 13 additions and 6 deletions

View File

@@ -34,7 +34,7 @@
#include "core/input/shortcut.h"
#include "core/os/keyboard.h"
const int InputEvent::DEVICE_ID_TOUCH_MOUSE = -1;
const int InputEvent::DEVICE_ID_EMULATION = -1;
const int InputEvent::DEVICE_ID_INTERNAL = -2;
void InputEvent::set_device(int p_device) {