summaryrefslogtreecommitdiffstats
path: root/src/hid_core/hid_types.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2024-02-24 19:13:47 +0100
committergerman77 <juangerman-13@hotmail.com>2024-02-24 19:19:51 +0100
commitca7f949ee84a7f15990c9e09f2de9ea54b8f997a (patch)
tree9632df004486acd6c28e2f4ff5dfdb463f8c0c43 /src/hid_core/hid_types.h
parentservice: set: Enable nfc and others by default and bump version (diff)
downloadyuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.tar
yuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.tar.gz
yuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.tar.bz2
yuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.tar.lz
yuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.tar.xz
yuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.tar.zst
yuzu-ca7f949ee84a7f15990c9e09f2de9ea54b8f997a.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;