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: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e3d42ca303
commit
38059e7ecf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue