Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened

This commit is contained in:
Sam Lantinga 2018-03-07 13:30:40 -08:00
parent f0be85b8b3
commit b81da78518
7 changed files with 58 additions and 22 deletions

View file

@ -464,18 +464,6 @@ SDL_XINPUT_JoystickQuit(void)
}
}
SDL_bool
SDL_SYS_IsXInputGamepad_DeviceIndex(int device_index)
{
JoyStick_DeviceData *device = SYS_Joystick;
int index;
for (index = device_index; index > 0; index--)
device = device->pNext;
return device->bXInputDevice;
}
#else /* !SDL_JOYSTICK_XINPUT */
typedef struct JoyStick_DeviceData JoyStick_DeviceData;