From 042c6602a057c990bf2eeec31b88c48e987050c7 Mon Sep 17 00:00:00 2001
From: Ameer <aj662@drexel.edu>
Date: Fri, 10 Jul 2020 11:07:43 -0400
Subject: Break out of scan loop if can't find adapter on first run

---
 src/input_common/gcadapter/gc_adapter.cpp | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/input_common/gcadapter/gc_adapter.cpp')

diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp
index 38cf02f7eb..05607e0334 100644
--- a/src/input_common/gcadapter/gc_adapter.cpp
+++ b/src/input_common/gcadapter/gc_adapter.cpp
@@ -243,6 +243,9 @@ void Adapter::Setup() {
         }
         libusb_free_device_list(devices, 1);
     }
+    // Break out of the ScanThreadFunc() loop that is constantly looking for the device
+    // Assumes user has GC adapter plugged in before launch to use the adapter
+    detect_thread_running = false;
 }
 
 bool Adapter::CheckDeviceAccess(libusb_device* device) {
-- 
cgit v1.2.3-70-g09d2