Added SDL_GameControllerType enumerations for the Amazon Luna and Google Stadia controllers

Fixes bug https://github.com/libsdl-org/SDL/issues/4019
This commit is contained in:
Sam Lantinga
2021-07-24 09:10:18 -07:00
parent 6956f4aa19
commit 94b7a87645
5 changed files with 27 additions and 16 deletions

View File

@@ -51,10 +51,7 @@ typedef struct {
static SDL_bool
HIDAPI_DriverStadia_IsSupportedDevice(const char *name, SDL_GameControllerType type, Uint16 vendor_id, Uint16 product_id, Uint16 version, int interface_number, int interface_class, int interface_subclass, int interface_protocol)
{
if (vendor_id == USB_VENDOR_GOOGLE && product_id == USB_PRODUCT_GOOGLE_STADIA_CONTROLLER) {
return SDL_TRUE;
}
return SDL_FALSE;
return (type == SDL_CONTROLLER_TYPE_GOOGLE_STADIA) ? SDL_TRUE : SDL_FALSE;
}
static const char *