Make XInput joystick names match the numbers on the device.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 28 Aug 2013 17:17:21 -0400
changeset 7709edd2c14acf66
parent 7708 d5aa9910b1f7
child 7710 6364d6836634
Make XInput joystick names match the numbers on the device.

(And how the Haptic code already names them.)
src/joystick/windows/SDL_dxjoystick.c
     1.1 --- a/src/joystick/windows/SDL_dxjoystick.c	Wed Aug 28 17:12:07 2013 -0400
     1.2 +++ b/src/joystick/windows/SDL_dxjoystick.c	Wed Aug 28 17:17:21 2013 -0400
     1.3 @@ -745,7 +745,7 @@
     1.4      }
     1.5      SDL_zerop(pNewJoystick);
     1.6  
     1.7 -    SDL_snprintf(name, sizeof (name), "XInput Controller #%d", (int) userid);
     1.8 +    SDL_snprintf(name, sizeof (name), "XInput Controller #%u", ((unsigned int) userid) + 1);
     1.9      pNewJoystick->joystickname = SDL_strdup(name);
    1.10      if (!pNewJoystick->joystickname) {
    1.11          SDL_free(pNewJoystick);