From 1745bfdc455e1d03106a5547689cf6bafc0c9393 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Mon, 23 Sep 2013 11:07:15 -0400 Subject: [PATCH] Fix crash in gc games in netplay. --- Source/Core/Core/Src/NetPlayClient.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/Src/NetPlayClient.cpp b/Source/Core/Core/Src/NetPlayClient.cpp index 1c65de2b55..eae9fea35f 100644 --- a/Source/Core/Core/Src/NetPlayClient.cpp +++ b/Source/Core/Core/Src/NetPlayClient.cpp @@ -502,10 +502,13 @@ bool NetPlayClient::StartGame(const std::string &path) UpdateDevices(); - for (unsigned int i = 0; i < 4; ++i) + if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii) { - g_wiimote_sources[i] = m_wiimote_map[i] > 0 ? WIIMOTE_SRC_EMU : WIIMOTE_SRC_NONE; - GetUsbPointer()->AccessWiiMote(i | 0x100)->Activate(m_wiimote_map[i] > 0); + for (unsigned int i = 0; i < 4; ++i) + { + g_wiimote_sources[i] = m_wiimote_map[i] > 0 ? WIIMOTE_SRC_EMU : WIIMOTE_SRC_NONE; + GetUsbPointer()->AccessWiiMote(i | 0x100)->Activate(m_wiimote_map[i] > 0); + } } // Needed to prevent locking up at boot if (when) the wiimotes connect out of order.