summaryrefslogtreecommitdiffstats
path: root/src/hid_core/hid_types.h
diff options
context:
space:
mode:
authorliamwhite <liamwhite@users.noreply.github.com>2024-02-25 20:00:59 +0100
committerGitHub <noreply@github.com>2024-02-25 20:00:59 +0100
commit8416d1c028b3d0fe7ab70dacd28ab8e076014f70 (patch)
tree3ef0a2763194a01147b9f3e134efeaee8dc41b5b /src/hid_core/hid_types.h
parentMerge pull request #13160 from liamwhite/time (diff)
parentcore: hid: Reintroduce vibration filter (diff)
downloadyuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.tar
yuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.tar.gz
yuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.tar.bz2
yuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.tar.lz
yuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.tar.xz
yuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.tar.zst
yuzu-8416d1c028b3d0fe7ab70dacd28ab8e076014f70.zip
Diffstat (limited to 'src/hid_core/hid_types.h')
-rw-r--r--src/hid_core/hid_types.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/hid_core/hid_types.h b/src/hid_core/hid_types.h
index 1b2fc6295..38888fdd1 100644
--- a/src/hid_core/hid_types.h
+++ b/src/hid_core/hid_types.h
@@ -638,7 +638,11 @@ struct VibrationValue {
if (low_amplitude != b.low_amplitude || high_amplitude != b.high_amplitude) {
return false;
}
- if (low_frequency != b.low_amplitude || high_frequency != b.high_frequency) {
+ // Changes in frequency without amplitude don't have any effect
+ if (low_amplitude == 0 && high_amplitude == 0) {
+ return true;
+ }
+ if (low_frequency != b.low_frequency || high_frequency != b.high_frequency) {
return false;
}
return true;