From b589d720bfc01364a7c0114c7ea21d9e281fc9c6 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Wed, 16 Mar 2022 22:25:04 -0500 Subject: [PATCH] MappingCommon: Fix detection of hotkey and conjunction expressions. --- .../Core/InputCommon/ControllerInterface/MappingCommon.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp index 5adc8daf35..1c3e997769 100644 --- a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp +++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp @@ -107,16 +107,18 @@ BuildExpression(const std::vector for (auto& detection : detections) { - // Remove since released inputs. + // Remove since-released inputs. for (auto it = pressed_inputs.begin(); it != pressed_inputs.end();) { - if (!((*it)->release_time > detection.press_time)) + if ((*it)->release_time && (*it)->release_time <= detection.press_time) { handle_release(); it = pressed_inputs.erase(it); } else + { ++it; + } } handle_press(detection);