From afb5eff42685a0b5f2a91ed64237aaf7e2aa9468 Mon Sep 17 00:00:00 2001 From: nyanpasu64 Date: Sun, 18 Jun 2023 14:28:26 -0700 Subject: [PATCH] Don't burn a CPU core and spam logs when GC Adapter fails --- Source/Core/InputCommon/GCAdapter.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp index 21a1255fb0..cacb73bc79 100644 --- a/Source/Core/InputCommon/GCAdapter.cpp +++ b/Source/Core/InputCommon/GCAdapter.cpp @@ -211,6 +211,10 @@ static void ReadThreadFunc() ERROR_LOG_FMT(CONTROLLERINTERFACE, "Read: libusb_interrupt_transfer failed: {}", LibusbUtils::ErrorWrap(error)); } + if (error == LIBUSB_ERROR_IO) + { + break; + } ProcessInputPayload(input_buffer.data(), payload_size);