mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 23:06:03 +00:00
Make XInput joystick names match the numbers on the device.
(And how the Haptic code already names them.)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user