mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 17:36:25 +00:00
Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user