summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/GCAdapter.cpp
diff options
context:
space:
mode:
authornyanpasu64 <nyanpasu64@tuta.io>2023-07-02 22:24:08 -0700
committernyanpasu64 <nyanpasu64@tuta.io>2023-07-05 20:38:22 -0700
commitc893ccca58cb504b003b100880cc5074faf9e822 (patch)
tree73c265e03d7b63c5b04325c588c8b0dcda6eeae6 /Source/Core/InputCommon/GCAdapter.cpp
parent559a16da4999c1159bb4d594a969f13e77100a1c (diff)
Workaround GC adapter detection breaking when reset fails
Diffstat (limited to 'Source/Core/InputCommon/GCAdapter.cpp')
-rw-r--r--Source/Core/InputCommon/GCAdapter.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Core/InputCommon/GCAdapter.cpp b/Source/Core/InputCommon/GCAdapter.cpp
index 6088256a55..bb1542988e 100644
--- a/Source/Core/InputCommon/GCAdapter.cpp
+++ b/Source/Core/InputCommon/GCAdapter.cpp
@@ -218,10 +218,9 @@ static void ReadThreadFunc()
error = libusb_reset_device(s_handle);
ERROR_LOG_FMT(CONTROLLERINTERFACE, "Read: libusb_reset_device: {}",
LibusbUtils::ErrorWrap(error));
- if (error != 0)
- {
- break;
- }
+
+ // If error is nonzero, try fixing it next loop iteration. We can't easily return
+ // and cleanup program state without getting another thread to call Reset().
}
ProcessInputPayload(input_buffer.data(), payload_size);