Added support for the Nintendo Online controllers

This commit is contained in:
Sam Lantinga 2022-06-10 11:31:59 -07:00
parent b75cd2b36d
commit 68544be44b
16 changed files with 76 additions and 15 deletions

View file

@ -200,8 +200,8 @@ HIDAPI_SetupDeviceDriver(SDL_HIDAPI_Device *device)
device->driver = HIDAPI_GetDeviceDriver(device);
if (device->driver) {
const char *name = device->driver->GetDeviceName(device->vendor_id, device->product_id);
if (name) {
const char *name = device->driver->GetDeviceName(device->name, device->vendor_id, device->product_id);
if (name && name != device->name) {
SDL_free(device->name);
device->name = SDL_strdup(name);
}