diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2022-03-16 22:25:04 -0500 |
|---|---|---|
| committer | Jordan Woyak <jordan.woyak@gmail.com> | 2022-03-16 22:25:04 -0500 |
| commit | b589d720bfc01364a7c0114c7ea21d9e281fc9c6 (patch) | |
| tree | 52b4989901c81f4cdb242eb02cc6a83f643e596b /Source/Core/InputCommon/ControllerInterface | |
| parent | bf261f6144a8cc75bcbdd4c09b19bdfa3dbe49b3 (diff) | |
MappingCommon: Fix detection of hotkey and conjunction expressions.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
| -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); |
