[PATCH v2 09/10] winebus.sys: Implement PID device gain for SDL devices.

Rémi Bernon rbernon at codeweavers.com
Wed Nov 17 04:51:54 CST 2021


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 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,
-- 
2.33.1




More information about the wine-devel mailing list