Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
This commit is contained in:
parent
f0be85b8b3
commit
b81da78518
7 changed files with 58 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue