diff options
| author | Rémi Verschelde | 2016-11-11 10:47:10 +0100 |
|---|---|---|
| committer | GitHub | 2016-11-11 10:47:10 +0100 |
| commit | f0f04d5082c5640ec28399bdb5456433b3350438 (patch) | |
| tree | af8ba446cbd932790bc0073b9c183a46bcbdd7ea /main/input_default.cpp | |
| parent | 34f0ce1168ece7b293d39d99ef4187cdd278dca0 (diff) | |
| parent | 17d7e6a142500a80ba6628a32eca792c44bbbdb7 (diff) | |
| download | godot-f0f04d5082c5640ec28399bdb5456433b3350438.tar.gz godot-f0f04d5082c5640ec28399bdb5456433b3350438.tar.zst godot-f0f04d5082c5640ec28399bdb5456433b3350438.zip | |
Merge pull request #6862 from Faless/fix_6388
Fix Keyboard Input Hangs when using modifiers
Diffstat (limited to 'main/input_default.cpp')
| -rw-r--r-- | main/input_default.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp index 0995f7132..f4590fd07 100644 --- a/main/input_default.cpp +++ b/main/input_default.cpp @@ -377,13 +377,13 @@ void InputDefault::parse_input_event(const InputEvent& p_event) { if (InputMap::get_singleton()->event_is_action(p_event,E->key())) { - Action action; - action.fixed_frame=OS::get_singleton()->get_fixed_frames(); - action.idle_frame=OS::get_singleton()->get_idle_frames(); - action.pressed=p_event.is_pressed(); - - action_state[E->key()]=action; - + if(is_action_pressed(E->key()) != p_event.is_pressed()) { + Action action; + action.fixed_frame=OS::get_singleton()->get_fixed_frames(); + action.idle_frame=OS::get_singleton()->get_idle_frames(); + action.pressed=p_event.is_pressed(); + action_state[E->key()]=action; + } } } } |
