summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinNoGUI/MainNoGUI.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-07-22 12:42:55 +0200
committerGitHub <noreply@github.com>2017-07-22 12:42:55 +0200
commit57affaff22c1beeb08b76d998d72fb6f44376a47 (patch)
tree8d9e11ce3a2732b37c5c1bd24e13572a39e045df /Source/Core/DolphinNoGUI/MainNoGUI.cpp
parent2f0bec93cb3eb02f159461f13557bde4bd2771bb (diff)
parent5729ac0fc685d42035dfa1c850672822a247851c (diff)
Merge pull request #5803 from leoetlino/pause-and-lock
Replace balanced Core::PauseAndLock calls with RunAsCPUThread
Diffstat (limited to 'Source/Core/DolphinNoGUI/MainNoGUI.cpp')
-rw-r--r--Source/Core/DolphinNoGUI/MainNoGUI.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/DolphinNoGUI/MainNoGUI.cpp b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
index b62cf0e22c..dc55d41ec6 100644
--- a/Source/Core/DolphinNoGUI/MainNoGUI.cpp
+++ b/Source/Core/DolphinNoGUI/MainNoGUI.cpp
@@ -137,13 +137,13 @@ void Host_ConnectWiimote(int wm_idx, bool connect)
const auto ios = IOS::HLE::GetIOS();
if (!ios || SConfig::GetInstance().m_bt_passthrough_enabled)
return;
- bool was_unpaused = Core::PauseAndLock(true);
- const auto bt = std::static_pointer_cast<IOS::HLE::Device::BluetoothEmu>(
- ios->GetDeviceByName("/dev/usb/oh1/57e/305"));
- if (bt)
- bt->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
- Host_UpdateMainFrame();
- Core::PauseAndLock(false, was_unpaused);
+ Core::RunAsCPUThread([&] {
+ const auto bt = std::static_pointer_cast<IOS::HLE::Device::BluetoothEmu>(
+ ios->GetDeviceByName("/dev/usb/oh1/57e/305"));
+ if (bt)
+ bt->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
+ Host_UpdateMainFrame();
+ });
});
}