From 81b1425b52219803f166171b254dbd40691aa5e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Sat, 11 Feb 2017 09:02:32 +0100 Subject: [PATCH] Remove useless Wiimote reconnect code on ES_Launch Turns out it is completely unneeded and it actually works better *without* it. Just try launching the system menu from the HBC; in current master, it will disconnect the remote and not connect it automatically again. With this change, it will. --- Source/Core/Core/IOS/ES/ES.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index ba85691e08..2e55d311b0 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -52,11 +52,8 @@ #include "Core/ConfigManager.h" #include "Core/HW/DVDInterface.h" #include "Core/HW/Memmap.h" -#include "Core/HW/Wiimote.h" #include "Core/IOS/ES/ES.h" #include "Core/IOS/ES/Formats.h" -#include "Core/IOS/USB/Bluetooth/BTEmu.h" -#include "Core/IOS/USB/Bluetooth/WiimoteDevice.h" #include "Core/PowerPC/PowerPC.h" #include "Core/WiiRoot.h" #include "Core/ec_wii.h" @@ -1202,34 +1199,7 @@ IPCCommandResult ES::LaunchBC(const IOCtlVRequest& request) void ES::ResetAfterLaunch(const u64 ios_to_load) const { - auto bt = std::static_pointer_cast(GetDeviceByName("/dev/usb/oh1/57e/305")); - bool* wiiMoteConnected = new bool[MAX_BBMOTES]; - if (!SConfig::GetInstance().m_bt_passthrough_enabled && bt) - { - for (unsigned int i = 0; i < MAX_BBMOTES; i++) - wiiMoteConnected[i] = bt->m_WiiMotes[i].IsConnected(); - } - Reload(ios_to_load); - - // Get the new Bluetooth device. Note that it is not guaranteed to exist. - bt = std::static_pointer_cast(GetDeviceByName("/dev/usb/oh1/57e/305")); - if (!SConfig::GetInstance().m_bt_passthrough_enabled && bt) - { - for (unsigned int i = 0; i < MAX_BBMOTES; i++) - { - if (wiiMoteConnected[i]) - { - bt->m_WiiMotes[i].Activate(false); - bt->m_WiiMotes[i].Activate(true); - } - else - { - bt->m_WiiMotes[i].Activate(false); - } - } - } - delete[] wiiMoteConnected; } IPCCommandResult ES::CheckKoreaRegion(const IOCtlVRequest& request)