Fixed PS3 controller initialization over Bluetooth

Now that we have hidapi that knows whether the controller is connected via Bluetooth or USB, this is much easier to fix.
This commit is contained in:
Sam Lantinga
2023-06-08 10:46:56 -07:00
parent e15da1985a
commit 32d015a6a0
2 changed files with 3 additions and 2 deletions

View File

@@ -144,14 +144,14 @@ static SDL_bool HIDAPI_DriverPS3_InitDevice(SDL_HIDAPI_Device *device)
device->context = ctx;
/* Set the controller into report mode over Bluetooth */
{
if (device->is_bluetooth) {
Uint8 data[] = { 0xf4, 0x42, 0x03, 0x00, 0x00 };
SendFeatureReport(device->dev, data, sizeof(data));
}
/* Set the controller into report mode over USB */
{
if (!device->is_bluetooth) {
Uint8 data[USB_PACKET_LENGTH];
int size = ReadFeatureReport(device->dev, 0xf2, data, 17);