Module: wine Branch: master Commit: 9736a36fe60f611558774fcb4bbef32e2706f4b6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9736a36fe60f611558774fcb4... Author: Brendan McGrath <brendan(a)redmandi.com> Date: Tue Nov 20 11:17:10 2018 +1100 winebus.sys: Use JoystickNumButtons for button_count. Signed-off-by: Brendan McGrath <brendan(a)redmandi.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winebus.sys/bus_sdl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winebus.sys/bus_sdl.c b/dlls/winebus.sys/bus_sdl.c index 6b2b28e..4f0f685 100644 --- a/dlls/winebus.sys/bus_sdl.c +++ b/dlls/winebus.sys/bus_sdl.c @@ -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); }