[PATCH 3/5] winebus.sys: Use 0 for the infinity durations in the UDEV lnxev backend.

Rémi Bernon rbernon at codeweavers.com
Thu Dec 9 07:44:13 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 88b5bddf532..dfba65fd06d 100644
--- a/dlls/winebus.sys/bus_udev.c
+++ b/dlls/winebus.sys/bus_udev.c
@@ -1045,7 +1045,7 @@ static NTSTATUS lnxev_device_physical_effect_update(struct unix_device *iface, B
     if (params->effect_type == PID_USAGE_UNDEFINED) return STATUS_SUCCESS;
     if ((status = set_effect_type_from_usage(&effect, params->effect_type))) return status;
 
-    effect.replay.length = params->duration;
+    effect.replay.length = (params->duration == 0xffff ? 0 : params->duration);
     effect.replay.delay = params->start_delay;
     effect.trigger.button = params->trigger_button;
     effect.trigger.interval = params->trigger_repeat_interval;
-- 
2.34.0




More information about the wine-devel mailing list