diff options
Diffstat (limited to 'core/input/input_map.cpp')
-rw-r--r-- | core/input/input_map.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 7fd1806b31..178d02b987 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -274,6 +274,13 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str if (r_raw_strength != nullptr) { *r_raw_strength = strength; } + if (r_event_index) { + if (input_event_action->get_event_index() >= 0) { + *r_event_index = input_event_action->get_event_index(); + } else { + *r_event_index = E->value.inputs.size(); + } + } return input_event_action->get_action() == p_action; } |