Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 85123a58 authored by Tomasz Pakuła's avatar Tomasz Pakuła Committed by Greg Kroah-Hartman
Browse files

HID: pidff: Convert infinite length from Linux API to PID standard



[ Upstream commit 37e0591fe44dce39d1ebc7a82d5b6e4dba1582eb ]

Software uses 0 as de-facto infinite lenght on Linux FF apis (SDL),
Linux doesn't actually define anythi as of now, while USB PID defines
NULL (0xffff). Most PID devices do not expect a 0-length effect and
can't interpret it as infinite. This change fixes Force Feedback for
most PID compliant devices.

As most games depend on updating the values of already playing infinite
effects, this is crucial to ensure they will actually work.

Previously, users had to rely on third-party software to do this conversion
and make their PID devices usable.

Co-developed-by: default avatarMakarenko Oleg <oleg@makarenk.ooo>
Signed-off-by: default avatarMakarenko Oleg <oleg@makarenk.ooo>
Signed-off-by: default avatarTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Reviewed-by: default avatarMichał Kopeć <michal@nozomi.space>
Reviewed-by: default avatarPaul Dino Jones <paul@spacefreak18.xyz>
Tested-by: default avatarPaul Dino Jones <paul@spacefreak18.xyz>
Tested-by: default avatarCristóferson Bueno <cbueno81@gmail.com>
Tested-by: default avatarPablo Cisneros <patchkez@protonmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5d6569da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment