From aa652114862aeb4e7800738cff6388a5ee62cce7 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 28 Aug 2013 17:17:21 -0400 Subject: [PATCH] Make XInput joystick names match the numbers on the device. (And how the Haptic code already names them.) --- src/joystick/windows/SDL_dxjoystick.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/joystick/windows/SDL_dxjoystick.c b/src/joystick/windows/SDL_dxjoystick.c index 6d4ed24bd356a..9399ee67acad2 100644 --- a/src/joystick/windows/SDL_dxjoystick.c +++ b/src/joystick/windows/SDL_dxjoystick.c @@ -745,7 +745,7 @@ AddXInputDevice(const Uint8 userid, JoyStick_DeviceData **pContext) } SDL_zerop(pNewJoystick); - SDL_snprintf(name, sizeof (name), "XInput Controller #%d", (int) userid); + SDL_snprintf(name, sizeof (name), "XInput Controller #%u", ((unsigned int) userid) + 1); pNewJoystick->joystickname = SDL_strdup(name); if (!pNewJoystick->joystickname) { SDL_free(pNewJoystick);