Rework envelope checks to fix FFB for Moza

Only set envelopes when they are needed (any value is != 0). This fixes
Moza FFB in games that use Sine effect to emulate constant force.

Remove FIX_PERIODIC_ENVELOPE quirk as it's no longer needed
This commit is contained in:
Lawstorant
2024-07-26 23:28:57 +02:00
parent 96e036acda
commit 8220bbbfb0
3 changed files with 26 additions and 36 deletions

View File

@@ -4,21 +4,15 @@
/* PIDFF Quirks to solve issues with certain devices */
/*
* Always set a value > 0 for PERIODIC envelope attack and fade level
*/
#define PIDFF_QUIRK_FIX_PERIODIC_ENVELOPE BIT(0)
/*
* Ignore direction and always set 16384 (0x4000)
*/
#define PIDFF_QUIRK_FIX_WHEEL_DIRECTION BIT(1)
*/
#define PIDFF_QUIRK_FIX_WHEEL_DIRECTION BIT(0)
/*
* Skip initialization of 0xA7 descriptor (Delay effect)
*/
#define PIDFF_QUIRK_NO_DELAY_EFFECT BIT(2)
*/
#define PIDFF_QUIRK_NO_DELAY_EFFECT BIT(1)
int hid_pidff_init_quirks(struct hid_device *hid, const struct hid_device_id *id);