Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10519 from jordan-woyak/fix-hotkey-detections
MappingCommon: Fix detection of hotkey and conjunction expressions.
  • Loading branch information
JMC47 committed Mar 19, 2022
2 parents f73b2d7 + b589d72 commit edd63d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit edd63d8

Please sign in to comment.