macOS: Fix DS3 init on Monterey

This commit is contained in:
nastys 2022-01-24 11:18:08 +01:00 committed by Megamouse
parent 5920372929
commit d2897bc6a0
2 changed files with 9 additions and 1 deletions

@ -1 +1 @@
Subproject commit c47734cb076881097e241ed691691793075a93a3
Subproject commit 8ff2deec755c4cdf9515930ecb4a94ec17bc98d1

View File

@ -292,6 +292,14 @@ void ds3_pad_handler::check_add_device(hid_device* hidDevice, std::string_view p
return;
}
device->report_id = buf[0];
#elif defined (__APPLE__)
int res = hid_init_sixaxis_usb(hidDevice);
if (res < 0)
{
ds3_log.error("check_add_device: hid_init_sixaxis_usb failed! (result=%d, error=%s)", res, hid_error(hidDevice));
hid_close(hidDevice);
return;
}
#endif
for (wchar_t ch : wide_serial)