Navigation Menu

Skip to content

Commit

Permalink
Make XInput joystick names match the numbers on the device.
Browse files Browse the repository at this point in the history
(And how the Haptic code already names them.)
  • Loading branch information
icculus committed Aug 28, 2013
1 parent 7949989 commit aa65211
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/joystick/windows/SDL_dxjoystick.c
Expand Up @@ -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);
Expand Down

0 comments on commit aa65211

Please sign in to comment.