Please sign in to comment.
IOS/USB: Fix initial device scan
Even though libusb is supposed to be thread-safe, in practice it's not (at least on Windows); getting a list of devices from two different threads can result in libusb crashes. This is easily fixed by waiting for the scan thread to complete scanning instead of running the scan on the CPU thread. This also fixes an issue that I had overlooked in the initial implementation: IOS interfaces such as OH0 are sometimes opened every frame, in which case we were doing a full device scan every single frame on the CPU thread!
- Loading branch information...
Showing with 10 additions and 4 deletions.