Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9039 from shuffle2/bt-dll
windows: keep an extra reference to BluetoothApis.dll
  • Loading branch information
JMC47 committed Sep 11, 2020
2 parents dcbe9da + e601bc5 commit 1335df8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/Core/HW/WiimoteReal/IOWin.cpp
Expand Up @@ -24,6 +24,7 @@

#include "Common/CommonFuncs.h"
#include "Common/CommonTypes.h"
#include "Common/DynamicLibrary.h"
#include "Common/Logging/Log.h"
#include "Common/ScopeGuard.h"
#include "Common/Thread.h"
Expand Down Expand Up @@ -168,6 +169,7 @@ bool load_bthprops()
void init_lib()
{
static bool initialized = false;
static Common::DynamicLibrary bt_api_lib;

if (!initialized)
{
Expand All @@ -182,6 +184,10 @@ void init_lib()
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;
}
}
Expand Down

0 comments on commit 1335df8

Please sign in to comment.