Commit 38059e7e authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

winebus.sys: Fix inverted SDL joystick hat switch y axis.

SDL_HAT_UP should work as SDL_CONTROLLER_BUTTON_DPAD_UP. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40658Signed-off-by: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e3d42ca3
...@@ -161,14 +161,14 @@ static void set_hat_value(struct unix_device *iface, int index, int value) ...@@ -161,14 +161,14 @@ static void set_hat_value(struct unix_device *iface, int index, int value)
switch (value) switch (value)
{ {
case SDL_HAT_CENTERED: break; case SDL_HAT_CENTERED: break;
case SDL_HAT_UP: y = 1; break; case SDL_HAT_DOWN: y = 1; break;
case SDL_HAT_RIGHTUP: y = x = 1; break; case SDL_HAT_RIGHTDOWN: y = x = 1; break;
case SDL_HAT_RIGHT: x = 1; break; case SDL_HAT_RIGHT: x = 1; break;
case SDL_HAT_RIGHTDOWN: x = 1; y = -1; break; case SDL_HAT_RIGHTUP: x = 1; y = -1; break;
case SDL_HAT_DOWN: y = -1; break; case SDL_HAT_UP: y = -1; break;
case SDL_HAT_LEFTDOWN: x = y = -1; break; case SDL_HAT_LEFTUP: x = y = -1; break;
case SDL_HAT_LEFT: x = -1; break; case SDL_HAT_LEFT: x = -1; break;
case SDL_HAT_LEFTUP: x = -1; y = 1; break; case SDL_HAT_LEFTDOWN: x = -1; y = 1; break;
} }
hid_device_set_hatswitch_x(iface, index, x); hid_device_set_hatswitch_x(iface, index, x);
hid_device_set_hatswitch_y(iface, index, y); hid_device_set_hatswitch_y(iface, index, y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment