mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-25 22:08:40 +00:00
GCAdapter: protect some more functions
Reset() and Setup() are not used outside of this namespace
This commit is contained in:
parent
54b4efff6b
commit
1bbbe92cd2
4 changed files with 9 additions and 8 deletions
|
@ -23,6 +23,8 @@ namespace GCAdapter
|
|||
static bool CheckDeviceAccess(libusb_device* device);
|
||||
static void AddGCAdapter(libusb_device* device);
|
||||
static void ResetRumbleLockNeeded();
|
||||
static void Reset();
|
||||
static void Setup();
|
||||
|
||||
static bool s_detected = false;
|
||||
static libusb_device_handle* s_handle = nullptr;
|
||||
|
@ -183,7 +185,7 @@ void StopScanThread()
|
|||
}
|
||||
}
|
||||
|
||||
void Setup()
|
||||
static void Setup()
|
||||
{
|
||||
libusb_device** list;
|
||||
ssize_t cnt = libusb_get_device_list(s_libusb_context, &list);
|
||||
|
@ -333,7 +335,7 @@ void Shutdown()
|
|||
s_libusb_driver_not_supported = false;
|
||||
}
|
||||
|
||||
void Reset()
|
||||
static void Reset()
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(s_init_mutex, std::defer_lock);
|
||||
if (!lock.try_lock())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue