From fb46520c74fcb43eb3ae5e632ea0dde0832d14da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Wed, 22 Feb 2017 22:50:05 +0100 Subject: [PATCH] Netplay: Change Wiimote sources before booting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is kind of silly to connect all of the configured Wii remotes (from the user config; NOT netplay assigned remotes), then connect/disconnect additional Wii remotes *after* the core has booted. (The bWii check has been removed, because it's actually unneeded; m_wiimote_map is always usable regardless of bWii. And we can't get info about the currently running game without booting the core with our current config system…) This should fix Netplay trying to connect all configured Wii remotes. --- Source/Core/Core/NetPlayClient.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 1c107e1626..0c6cb246af 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -820,17 +820,12 @@ bool NetPlayClient::StartGame(const std::string& path) Movie::BeginRecordingInput(controllers_mask); } + for (unsigned int i = 0; i < 4; ++i) + WiimoteReal::ChangeWiimoteSource(i, m_wiimote_map[i] > 0 ? WIIMOTE_SRC_EMU : WIIMOTE_SRC_NONE); + // boot game - m_dialog->BootGame(path); - if (SConfig::GetInstance().bWii) - { - for (unsigned int i = 0; i < 4; ++i) - WiimoteReal::ChangeWiimoteSource(i, - m_wiimote_map[i] > 0 ? WIIMOTE_SRC_EMU : WIIMOTE_SRC_NONE); - } - UpdateDevices(); return true;