mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
FreeBSD workaround for libusb
This commit is contained in:
parent
db685879af
commit
07dba02897
1 changed files with 7 additions and 2 deletions
|
@ -166,10 +166,12 @@ usb_handler_thread::usb_handler_thread()
|
|||
return;
|
||||
}
|
||||
|
||||
#if LIBUSB_API_VERSION >= 0x01000107
|
||||
// Set LIBUSB_DEBUG env variable to receive log messages
|
||||
libusb_set_log_cb(ctx, [](libusb_context* ctx, libusb_log_level level, const char* str)
|
||||
libusb_set_log_cb(ctx, [](libusb_context* /* ctx */, libusb_log_level level, const char* str)
|
||||
{
|
||||
if (!str) return;
|
||||
if (!str)
|
||||
return;
|
||||
|
||||
const std::string msg = fmt::trim(str, " \t\n");
|
||||
|
||||
|
@ -187,8 +189,11 @@ usb_handler_thread::usb_handler_thread()
|
|||
case LIBUSB_LOG_LEVEL_DEBUG:
|
||||
sys_usbd.trace("libusb log: %s", msg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}, LIBUSB_LOG_CB_CONTEXT);
|
||||
#endif
|
||||
|
||||
for (u32 index = 0; index < MAX_SYS_USBD_TRANSFERS; index++)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue