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:
Brendan McGrath 2018-11-20 11:17:10 +11:00 committed by Alexandre Julliard
parent 7229893493
commit 9736a36fe6
1 changed files with 1 additions and 1 deletions

View File

@ -857,7 +857,7 @@ static void try_add_device(SDL_JoystickID index)
id, vid, pid, version, debugstr_w(serial));
axis_count = pSDL_JoystickNumAxes(joystick);
button_count = pSDL_JoystickNumAxes(joystick);
button_count = pSDL_JoystickNumButtons(joystick);
is_xbox_gamepad = (axis_count == 6 && button_count >= 14);
}