Module: wine Branch: master Commit: 415d7098febfbc80b6239c0873837e94552de90b URL: https://gitlab.winehq.org/wine/wine/-/commit/415d7098febfbc80b6239c0873837e9...
Author: Matthias Gorzellik matthias.gorzellik@gmail.com Date: Wed Jul 10 15:57:32 2024 +0200
winebus.sys: Fix rotation for angles < 90deg.
---
dlls/winebus.sys/bus_sdl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 2a60f112a83..71f91162fb1 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -661,7 +661,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT struct sdl_device *impl = impl_from_unix_device(iface); int id = impl->effect_ids[index]; SDL_HapticEffect effect = {0}; - UINT16 direction; + INT16 direction; NTSTATUS status;
TRACE("iface %p, index %u, params %p.\n", iface, index, params); @@ -672,6 +672,7 @@ static NTSTATUS sdl_device_physical_effect_update(struct unix_device *iface, BYT /* The first direction we get from PID is in polar coordinate space, so we need to * remove 90° to make it match SDL spherical coordinates. */ direction = (params->direction[0] - 9000) % 36000; + if (direction < 0) direction += 36000;
switch (params->effect_type) {