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:
commit
65135190d4
|
@ -138,8 +138,8 @@ void RemoveSpuriousTriggerCombinations(
|
||||||
{
|
{
|
||||||
const auto is_spurious = [&](auto& detection) {
|
const auto is_spurious = [&](auto& detection) {
|
||||||
return std::any_of(detections->begin(), detections->end(), [&](auto& d) {
|
return std::any_of(detections->begin(), detections->end(), [&](auto& d) {
|
||||||
// This is a suprious digital detection if a "smooth" (analog) detection is temporally near.
|
// This is a spurious digital detection if a "smooth" (analog) detection is temporally near.
|
||||||
return &d != &detection && d.smoothness > 1 &&
|
return &d != &detection && d.smoothness > 1 && d.smoothness > detection.smoothness &&
|
||||||
abs(d.press_time - detection.press_time) < SPURIOUS_TRIGGER_COMBO_THRESHOLD;
|
abs(d.press_time - detection.press_time) < SPURIOUS_TRIGGER_COMBO_THRESHOLD;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue