summaryrefslogtreecommitdiffstats
path: root/core/input/input_map.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-06-20 00:29:42 +0200
committerGitHub <noreply@github.com>2021-06-20 00:29:42 +0200
commit4effadc0ba45abd72f8893f0137822e6d3b3f1c4 (patch)
treedcaef42f26868cee15e63d092c930f5d2d64f52b /core/input/input_map.cpp
parentd88be9b70cfecb0ec525216c1bb6267c9d1aa17d (diff)
parent7104229a85acbc30bf5dcc9c8a0ada8571910456 (diff)
downloadredot-engine-4effadc0ba45abd72f8893f0137822e6d3b3f1c4.tar.gz
Merge pull request #48696 from madmiraal/fix-48692
Fix `InputMap.action_erase_event()` failing to erase events correctly.
Diffstat (limited to 'core/input/input_map.cpp')
-rw-r--r--core/input/input_map.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index c43fd64561..52dc561546 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -130,12 +130,9 @@ List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Re
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
const Ref<InputEvent> e = E->get();
- //if (e.type != Ref<InputEvent>::KEY && e.device != p_event.device) -- unsure about the KEY comparison, why is this here?
- // continue;
-
int device = e->get_device();
if (device == ALL_DEVICES || device == p_event->get_device()) {
- if (p_exact_match && e->shortcut_match(p_event)) {
+ if (p_exact_match && e->is_match(p_event, true)) {
return E;
} else if (!p_exact_match && e->action_match(p_event, p_pressed, p_strength, p_raw_strength, p_action.deadzone)) {
return E;