From a0905c9b3b2b6ce071f283a6b165cffc012a6e48 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 26 Aug 2024 17:57:28 +1000 Subject: [PATCH] InputManager: Don't set key down for binds when ImGui has focus Fixes unpausing etc when alt-tabbing. --- src/util/input_manager.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/input_manager.cpp b/src/util/input_manager.cpp index 93cc6528b..e9f90105e 100644 --- a/src/util/input_manager.cpp +++ b/src/util/input_manager.cpp @@ -1032,7 +1032,8 @@ bool InputManager::ProcessEvent(InputBindingKey key, float value, bool skip_butt else if (binding->num_keys >= min_num_keys) { // update state based on whether the whole chord was activated - const u8 new_mask = (new_state ? (binding->current_mask | bit) : (binding->current_mask & ~bit)); + const u8 new_mask = + ((new_state && !skip_button_handlers) ? (binding->current_mask | bit) : (binding->current_mask & ~bit)); const bool prev_full_state = (binding->current_mask == binding->full_mask); const bool new_full_state = (new_mask == binding->full_mask); binding->current_mask = new_mask;