summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-06-08 14:28:53 +0200
committerGitHub <noreply@github.com>2023-06-08 14:28:53 +0200
commit65135190d4a84c25e97133d47655dde03ebc2c67 (patch)
tree5d039a9ab72b8b5f313d8cf71d13062863bac41a /Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
parent44d93048b3544a3a1bd632a9b05623f67d587e1b (diff)
parent71ac6ec23962a360e1f08abc3c7ff989ac8f1106 (diff)
Merge pull request #11897 from JosJuice/spurious-two-analog
InputCommon: Don't treat two analog inputs as a spurious trigger combo
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
index e28e044866..7b21cf78e0 100644
--- a/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.cpp
@@ -138,8 +138,8 @@ void RemoveSpuriousTriggerCombinations(
{
const auto is_spurious = [&](auto& detection) {
return std::any_of(detections->begin(), detections->end(), [&](auto& d) {
- // This is a suprious digital detection if a "smooth" (analog) detection is temporally near.
- return &d != &detection && d.smoothness > 1 &&
+ // This is a spurious digital detection if a "smooth" (analog) detection is temporally near.
+ return &d != &detection && d.smoothness > 1 && d.smoothness > detection.smoothness &&
abs(d.press_time - detection.press_time) < SPURIOUS_TRIGGER_COMBO_THRESHOLD;
});
};