mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 01:32:21 +02:00
HID: pidff: Use correct effect type in effect update
When updating an existing effect, the effect type from the last created
effect was sent to the device instead of the updated one.
This caused incorrect reports when a game creates multiple different
effects and updates only one that is not the last created.
Fixes FFB in multiple games that create multiple simultaneous effects
(Forza Horizon 5/6).
Fixes: 224ee88fe3 ("Input: add force feedback driver for PID devices")
Cc: stable@vger.kernel.org
Tested-by: Oliver Roundtree <oroundtree1@gmail.com>
Co-developed-by: Ryno Kotzé <lemon.xah@gmail.com>
Signed-off-by: Ryno Kotzé <lemon.xah@gmail.com>
Signed-off-by: Oleg Makarenko <oleg@makarenk.ooo>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
This commit is contained in:
parent
d0ff08d946
commit
b251598b8b
|
|
@ -522,7 +522,7 @@ static void pidff_set_effect_report(struct pidff_device *pidff,
|
|||
pidff->set_effect[PID_EFFECT_BLOCK_INDEX].value[0] =
|
||||
pidff->block_load[PID_EFFECT_BLOCK_INDEX].value[0];
|
||||
pidff->set_effect_type->value[0] =
|
||||
pidff->create_new_effect_type->value[0];
|
||||
pidff_get_effect_type_id(pidff, effect);
|
||||
|
||||
pidff_set_duration(&pidff->set_effect[PID_DURATION],
|
||||
effect->replay.length);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user