mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-26 19:56:30 +00:00
Don't send k_EPS5FeatureReportIdCapabilities to Sony PS5 controllers
This report is for third party controllers only. (cherry picked from commit 16dd5f0da4ee950e9f998a757dcb4789463e67e2)
This commit is contained in:
parent
910dad505a
commit
bb036ef544
|
@ -421,7 +421,6 @@ static SDL_bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data));
|
|
||||||
/* Get the device capabilities */
|
/* Get the device capabilities */
|
||||||
if (device->vendor_id == USB_VENDOR_SONY) {
|
if (device->vendor_id == USB_VENDOR_SONY) {
|
||||||
ctx->sensors_supported = SDL_TRUE;
|
ctx->sensors_supported = SDL_TRUE;
|
||||||
|
@ -429,7 +428,10 @@ static SDL_bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
|
||||||
ctx->vibration_supported = SDL_TRUE;
|
ctx->vibration_supported = SDL_TRUE;
|
||||||
ctx->playerled_supported = SDL_TRUE;
|
ctx->playerled_supported = SDL_TRUE;
|
||||||
ctx->touchpad_supported = SDL_TRUE;
|
ctx->touchpad_supported = SDL_TRUE;
|
||||||
} else if (size == 48 && data[2] == 0x28) {
|
} else {
|
||||||
|
/* Third party controller capability request */
|
||||||
|
size = ReadFeatureReport(device->dev, k_EPS5FeatureReportIdCapabilities, data, sizeof(data));
|
||||||
|
if (size == 48 && data[2] == 0x28) {
|
||||||
Uint8 capabilities = data[4];
|
Uint8 capabilities = data[4];
|
||||||
Uint8 capabilities2 = data[20];
|
Uint8 capabilities2 = data[20];
|
||||||
Uint8 device_type = data[5];
|
Uint8 device_type = data[5];
|
||||||
|
@ -485,6 +487,7 @@ static SDL_bool HIDAPI_DriverPS5_InitDevice(SDL_HIDAPI_Device *device)
|
||||||
ctx->sensors_supported = SDL_TRUE;
|
ctx->sensors_supported = SDL_TRUE;
|
||||||
ctx->touchpad_supported = SDL_TRUE;
|
ctx->touchpad_supported = SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ctx->effects_supported = (ctx->lightbar_supported || ctx->vibration_supported || ctx->playerled_supported);
|
ctx->effects_supported = (ctx->lightbar_supported || ctx->vibration_supported || ctx->playerled_supported);
|
||||||
|
|
||||||
device->joystick_type = joystick_type;
|
device->joystick_type = joystick_type;
|
||||||
|
|
Loading…
Reference in a new issue