Skip to content
Permalink
Browse files

Make XInput joystick names match the numbers on the device.

(And how the Haptic code already names them.)
  • Loading branch information
icculus committed Aug 28, 2013
1 parent 7949989 commit aa652114862aeb4e7800738cff6388a5ee62cce7
Showing with 1 addition and 1 deletion.
  1. +1 −1 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);

0 comments on commit aa65211

Please sign in to comment.