mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-03 17:02:41 +00:00
Use separate libusb contexts to avoid thread safety issues
Unfortunately, it appears that using libusb's synchronous transfer API from several threads causes nasty race conditions in event handling and can lead to deadlocks, despite the fact that libusb's synchronous API is documented to be perfectly fine to use from several threads (only the manual polling functionality is supposed to require special precautions). Since usbdk was the only real reason for using a single libusb context and since usbdk (currently) has so many issues with Dolphin, I think dropping support for it in order to fix other backends is acceptable.
This commit is contained in:
parent
769ba43abf
commit
cf60a9a7f7
8 changed files with 16 additions and 26 deletions
|
@ -109,12 +109,6 @@ bool Context::GetDeviceList(GetDeviceListCallback callback)
|
|||
return m_impl->GetDeviceList(std::move(callback));
|
||||
}
|
||||
|
||||
Context& GetContext()
|
||||
{
|
||||
static Context s_context;
|
||||
return s_context;
|
||||
}
|
||||
|
||||
ConfigDescriptor MakeConfigDescriptor(libusb_device* device, u8 config_num)
|
||||
{
|
||||
#if defined(__LIBUSB__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue