Skip to content
Snippets Groups Projects
Commit 38059e7e authored by Rémi Bernon's avatar Rémi Bernon :speech_balloon: Committed by Alexandre Julliard
Browse files

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=40658


Signed-off-by: default avatarRémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent e3d42ca3
No related branches found
No related tags found
No related merge requests found
......@@ -161,14 +161,14 @@ static void set_hat_value(struct unix_device *iface, int index, int value)
switch (value)
{
case SDL_HAT_CENTERED: break;
case SDL_HAT_UP: y = 1; break;
case SDL_HAT_RIGHTUP: y = x = 1; break;
case SDL_HAT_DOWN: y = 1; break;
case SDL_HAT_RIGHTDOWN: y = x = 1; break;
case SDL_HAT_RIGHT: x = 1; break;
case SDL_HAT_RIGHTDOWN: x = 1; y = -1; break;
case SDL_HAT_DOWN: y = -1; break;
case SDL_HAT_LEFTDOWN: x = y = -1; break;
case SDL_HAT_RIGHTUP: x = 1; y = -1; break;
case SDL_HAT_UP: y = -1; break;
case SDL_HAT_LEFTUP: x = y = -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_y(iface, index, y);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment