diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-06-08 12:17:37 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-06-08 15:29:11 -0700 |
| commit | 15cbb5c8f9ec1e64a137f93b032e8b5dc629817f (patch) | |
| tree | 9d3feb02b17c841981eb5275070cd58cbe9966e1 /Source/Core/InputCommon | |
| parent | 91a7c4bdf2633029ecde85718501b6c7a7d95e9d (diff) | |
Log warnings when LibusbUtils::GetDeviceList fails
Diffstat (limited to 'Source/Core/InputCommon')
| -rw-r--r-- | Source/Core/InputCommon/GCAdapter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index cf1b103f2f..993e032bf3 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -462,7 +462,7 @@ static void Setup() s_controller_type.fill(ControllerType::None); s_controller_rumble.fill(0); - s_libusb_context->GetDeviceList([](libusb_device* device) { + const int ret = s_libusb_context->GetDeviceList([](libusb_device* device) { if (CheckDeviceAccess(device)) { // Only connect to a single adapter in case the user has multiple connected @@ -471,6 +471,8 @@ static void Setup() } return true; }); + if (ret != LIBUSB_SUCCESS) + WARN_LOG_FMT(CONTROLLERINTERFACE, "Failed to get device list: {}", LibusbUtils::ErrorWrap(ret)); if (s_status != ADAPTER_DETECTED && prev_status != s_status && s_detect_callback != nullptr) s_detect_callback(); |
