Explorar o código

Break out of scan loop if can't find adapter on first run

Ameer %!s(int64=6) %!d(string=hai) anos
pai
achega
042c6602a0
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/input_common/gcadapter/gc_adapter.cpp

+ 3 - 0
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) {