[PATCH 1/5] winebus.sys: Scale the force feedback gain value to the Linux FF_GAIN range.

Rémi Bernon rbernon at codeweavers.com
Thu Dec 9 07:44:11 CST 2021


From: Ivo Ivanov <logos128 at gmail.com>

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51922
Signed-off-by: Ivo Ivanov <logos128 at gmail.com>
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 dlls/winebus.sys/bus_udev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c
index 540a4da508f..88b5bddf532 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -949,7 +949,7 @@ static NTSTATUS lnxev_device_physical_device_set_gain(struct unix_device *iface,
     {
         .type = EV_FF,
         .code = FF_GAIN,
-        .value = percent,
+        .value = 0xffff * percent / 100,
     };
 
     TRACE("iface %p, percent %#x.\n", iface, percent);
-- 
2.34.0




More information about the wine-devel mailing list