mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 04:25:12 +00:00
Bypassing usb count error
This commit is contained in:
parent
98faff425e
commit
0763601d35
@ -44,7 +44,18 @@ void PS4_SYSV_ABI sceUsbdExit() {
|
|||||||
s64 PS4_SYSV_ABI sceUsbdGetDeviceList(SceUsbdDevice*** list) {
|
s64 PS4_SYSV_ABI sceUsbdGetDeviceList(SceUsbdDevice*** list) {
|
||||||
LOG_DEBUG(Lib_Usbd, "called");
|
LOG_DEBUG(Lib_Usbd, "called");
|
||||||
|
|
||||||
return libusb_to_orbis_error(libusb_get_device_list(g_libusb_context, list));
|
static ssize_t last_count = -1;
|
||||||
|
|
||||||
|
ssize_t count = libusb_get_device_list(g_libusb_context, list);
|
||||||
|
if (count <= 0)
|
||||||
|
return libusb_to_orbis_error((int)count);
|
||||||
|
|
||||||
|
if (count != last_count) {
|
||||||
|
LOG_INFO(Lib_Usbd, "Found {} USB devices", count);
|
||||||
|
last_count = count;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ORBIS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PS4_SYSV_ABI sceUsbdFreeDeviceList(SceUsbdDevice** list, s32 unref_devices) {
|
void PS4_SYSV_ABI sceUsbdFreeDeviceList(SceUsbdDevice** list, s32 unref_devices) {
|
||||||
|
Loading…
Reference in New Issue
Block a user