winebus.sys: Use JoystickNumButtons for button_count.
Signed-off-by: Brendan McGrath <brendan@redmandi.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7229893493
commit
9736a36fe6
|
@ -857,7 +857,7 @@ static void try_add_device(SDL_JoystickID index)
|
||||||
id, vid, pid, version, debugstr_w(serial));
|
id, vid, pid, version, debugstr_w(serial));
|
||||||
|
|
||||||
axis_count = pSDL_JoystickNumAxes(joystick);
|
axis_count = pSDL_JoystickNumAxes(joystick);
|
||||||
button_count = pSDL_JoystickNumAxes(joystick);
|
button_count = pSDL_JoystickNumButtons(joystick);
|
||||||
is_xbox_gamepad = (axis_count == 6 && button_count >= 14);
|
is_xbox_gamepad = (axis_count == 6 && button_count >= 14);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue