mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 13:57:57 -07:00
c8a6dc6c23
libusb on Windows is limited to only a single context. Trying to open more than one can cause device enumerations to fail randomly. libusb is thread-safe and we don't use the manual polling support (with `poll()`) so this should be safe.
16 lines
439 B
C++
16 lines
439 B
C++
// Copyright 2017 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#include <memory>
|
|
|
|
struct libusb_context;
|
|
|
|
namespace LibusbContext
|
|
{
|
|
// libusb on Windows is limited to only a single context. Trying to open more
|
|
// than one can cause issues with device enumerations.
|
|
// libusb is thread-safe so this context can be safely used from different threads.
|
|
std::shared_ptr<libusb_context> Get();
|
|
}
|