Rémi Bernon : winebus.sys: Implement PID device gain for SDL devices.

Alexandre Julliard julliard at winehq.org
Wed Nov 17 16:27:57 CST 2021


Module: wine
Branch: master
Commit: 3495bd4492e95c84c34551679ed34f10019ebf79
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3495bd4492e95c84c34551679ed34f10019ebf79

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Wed Nov 17 11:51:54 2021 +0100

winebus.sys: Implement PID device gain for SDL devices.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winebus.sys/bus_sdl.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c
index 48d5ad85a2b..220e360d78f 100644
--- a/dlls/winebus.sys/bus_sdl.c
+++ b/dlls/winebus.sys/bus_sdl.c
@@ -482,9 +482,13 @@ static NTSTATUS sdl_device_physical_device_control(struct unix_device *iface, US
 
 static NTSTATUS sdl_device_physical_device_set_gain(struct unix_device *iface, BYTE value)
 {
-    FIXME("iface %p, value %#x stub!\n", iface, value);
+    struct sdl_device *impl = impl_from_unix_device(iface);
 
-    return STATUS_NOT_IMPLEMENTED;
+    TRACE("iface %p, value %#x.\n", iface, value);
+
+    pSDL_HapticSetGain(impl->sdl_haptic, value * 100 / 255);
+
+    return STATUS_SUCCESS;
 }
 
 static NTSTATUS sdl_device_physical_effect_control(struct unix_device *iface, BYTE index,




More information about the wine-cvs mailing list