diff options
| author | JMC47 <JMC4789@gmail.com> | 2022-03-19 00:41:00 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-19 00:41:00 -0400 |
| commit | edd63d8c3f07a9d5748eb7ac78fdb7688b3eb2d4 (patch) | |
| tree | 54b3a826d6c82f60b32b2ef0db350feb5d27f55b /Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp | |
| parent | f73b2d70a60d430ccba91d3b335578f2a5886bd1 (diff) | |
| parent | b589d720bfc01364a7c0114c7ea21d9e281fc9c6 (diff) | |
Merge pull request #10519 from jordan-woyak/fix-hotkey-detections
MappingCommon: Fix detection of hotkey and conjunction expressions.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp | 6 |
1 files 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<ciface::Core::DeviceContainer::InputDetection> 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); |
