Skip to content

Commit

Permalink
nsyshid/libusb: correct error message formatting, and print error str…
Browse files Browse the repository at this point in the history
…ing on device open failure
  • Loading branch information
capitalistspz committed Nov 9, 2024
1 parent 813f914 commit 582ba46
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Cafe/OS/libs/nsyshid/BackendLibusb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace nsyshid::backend::libusb
if (m_initReturnCode < 0)
{
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: {}",
m_initReturnCode);
return;
}
Expand All @@ -35,7 +35,7 @@ namespace nsyshid::backend::libusb
if (ret != LIBUSB_SUCCESS)
{
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);
}
else
Expand Down Expand Up @@ -415,7 +415,7 @@ namespace nsyshid::backend::libusb
if (ret < 0)
{
cemuLog_log(LogType::Force,
"nsyshid::DeviceLibusb::open(): failed to get device descriptor; return code: %i",
"nsyshid::DeviceLibusb::open(): failed to get device descriptor: {}",
ret);
libusb_free_device_list(devices, 1);
return false;
Expand All @@ -439,8 +439,8 @@ namespace nsyshid::backend::libusb
{
this->m_libusbHandle = nullptr;
cemuLog_log(LogType::Force,
"nsyshid::DeviceLibusb::open(): failed to open device; return code: %i",
ret);
"nsyshid::DeviceLibusb::open(): failed to open device: {}",
libusb_strerror(ret));
libusb_free_device_list(devices, 1);
return false;
}
Expand Down

0 comments on commit 582ba46

Please sign in to comment.