Merge pull request #11897 from JosJuice/spurious-two-analog

InputCommon: Don't treat two analog inputs as a spurious trigger combo
This commit is contained in:
Admiral H. Curtiss 2023-06-08 14:28:53 +02:00 committed by GitHub
commit 65135190d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;
});
};