Brendan McGrath : winebus.sys: Use JoystickNumButtons for button_count.

Alexandre Julliard julliard at winehq.org
Tue Nov 20 15:39:51 CST 2018


Module: wine
Branch: master
Commit: 9736a36fe60f611558774fcb4bbef32e2706f4b6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=9736a36fe60f611558774fcb4bbef32e2706f4b6

Author: Brendan McGrath <brendan at redmandi.com>
Date:   Tue Nov 20 11:17:10 2018 +1100

winebus.sys: Use JoystickNumButtons for button_count.

Signed-off-by: Brendan McGrath <brendan at redmandi.com>
Signed-off-by: Alexandre Julliard <julliard at 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);
     }
 




More information about the wine-cvs mailing list