mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
Merge pull request #9039 from shuffle2/bt-dll
windows: keep an extra reference to BluetoothApis.dll
This commit is contained in:
commit
1335df8eb5
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include "Common/CommonFuncs.h"
|
#include "Common/CommonFuncs.h"
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
#include "Common/DynamicLibrary.h"
|
||||||
#include "Common/Logging/Log.h"
|
#include "Common/Logging/Log.h"
|
||||||
#include "Common/ScopeGuard.h"
|
#include "Common/ScopeGuard.h"
|
||||||
#include "Common/Thread.h"
|
#include "Common/Thread.h"
|
||||||
@ -168,6 +169,7 @@ bool load_bthprops()
|
|||||||
void init_lib()
|
void init_lib()
|
||||||
{
|
{
|
||||||
static bool initialized = false;
|
static bool initialized = false;
|
||||||
|
static Common::DynamicLibrary bt_api_lib;
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
@ -182,6 +184,10 @@ void init_lib()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try to incref on this dll to prevent it being reloaded continuously (caused by
|
||||||
|
// BluetoothFindFirstRadio)
|
||||||
|
bt_api_lib.Open("BluetoothApis.dll");
|
||||||
|
|
||||||
s_loaded_ok = true;
|
s_loaded_ok = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user