Only include controller_type.h in SDL_joystick.c

It has a huge array of controllers and we only want it instantiated once
This commit is contained in:
Sam Lantinga 2022-05-24 17:24:03 -07:00
parent a8e7548797
commit b28d304b23
3 changed files with 11 additions and 2 deletions

View file

@ -2062,6 +2062,13 @@ SDL_GetJoystickGameControllerType(const char *name, Uint16 vendor, Uint16 produc
return type;
}
SDL_bool
SDL_IsJoystickXboxOne(Uint16 vendor_id, Uint16 product_id)
{
EControllerType eType = GuessControllerType(vendor_id, product_id);
return (eType == k_eControllerType_XBoxOneController);
}
SDL_bool
SDL_IsJoystickXboxOneElite(Uint16 vendor_id, Uint16 product_id)
{