mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-25 02:26:54 +01:00
nsyshid/libusb: correct error message formatting and print error string on open fail (#1407)
This commit is contained in:
parent
4ac1ab162a
commit
2e829479d9
@ -15,7 +15,7 @@ namespace nsyshid::backend::libusb
|
|||||||
if (m_initReturnCode < 0)
|
if (m_initReturnCode < 0)
|
||||||
{
|
{
|
||||||
m_ctx = nullptr;
|
m_ctx = nullptr;
|
||||||
cemuLog_logDebug(LogType::Force, "nsyshid::BackendLibusb: failed to initialize libusb with return code %i",
|
cemuLog_logDebug(LogType::Force, "nsyshid::BackendLibusb: failed to initialize libusb, return code: {}",
|
||||||
m_initReturnCode);
|
m_initReturnCode);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -35,7 +35,7 @@ namespace nsyshid::backend::libusb
|
|||||||
if (ret != LIBUSB_SUCCESS)
|
if (ret != LIBUSB_SUCCESS)
|
||||||
{
|
{
|
||||||
cemuLog_logDebug(LogType::Force,
|
cemuLog_logDebug(LogType::Force,
|
||||||
"nsyshid::BackendLibusb: failed to register hotplug callback with return code %i",
|
"nsyshid::BackendLibusb: failed to register hotplug callback with return code {}",
|
||||||
ret);
|
ret);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -415,7 +415,7 @@ namespace nsyshid::backend::libusb
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
cemuLog_log(LogType::Force,
|
cemuLog_log(LogType::Force,
|
||||||
"nsyshid::DeviceLibusb::open(): failed to get device descriptor; return code: %i",
|
"nsyshid::DeviceLibusb::open(): failed to get device descriptor, return code: {}",
|
||||||
ret);
|
ret);
|
||||||
libusb_free_device_list(devices, 1);
|
libusb_free_device_list(devices, 1);
|
||||||
return false;
|
return false;
|
||||||
@ -439,8 +439,8 @@ namespace nsyshid::backend::libusb
|
|||||||
{
|
{
|
||||||
this->m_libusbHandle = nullptr;
|
this->m_libusbHandle = nullptr;
|
||||||
cemuLog_log(LogType::Force,
|
cemuLog_log(LogType::Force,
|
||||||
"nsyshid::DeviceLibusb::open(): failed to open device; return code: %i",
|
"nsyshid::DeviceLibusb::open(): failed to open device: {}",
|
||||||
ret);
|
libusb_strerror(ret));
|
||||||
libusb_free_device_list(devices, 1);
|
libusb_free_device_list(devices, 1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user