diff --git a/Source/Core/Core/Src/HW/SI.cpp b/Source/Core/Core/Src/HW/SI.cpp index 738b97917d..85c84f92dd 100644 --- a/Source/Core/Core/Src/HW/SI.cpp +++ b/Source/Core/Core/Src/HW/SI.cpp @@ -263,7 +263,7 @@ void Init() if (Movie::IsRecordingInput() || Movie::IsPlayingInput()) AddDevice(Movie::IsUsingPad(i) ? (Movie::IsUsingBongo(i) ? SIDEVICE_GC_TARUKONGA : SIDEVICE_GC_CONTROLLER) : SIDEVICE_NONE, i); else if (NetPlay::GetNetPlayPtr()) - AddDevice(NetPlay::IsUsingPad(i) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE, i); + AddDevice((SIDevices) g_NetPlaySettings.m_Controllers[i], i); else AddDevice(SConfig::GetInstance().m_SIDevice[i], i); } diff --git a/Source/Core/Core/Src/NetPlay.cpp b/Source/Core/Core/Src/NetPlay.cpp index b9c5e95a5b..48eb6f5cad 100644 --- a/Source/Core/Core/Src/NetPlay.cpp +++ b/Source/Core/Core/Src/NetPlay.cpp @@ -289,13 +289,9 @@ void NetPlay::GetNetSettings() g_NetPlaySettings.m_CPUthread = instance.m_LocalCoreStartupParameter.bCPUThread; g_NetPlaySettings.m_DSPHLE = instance.m_LocalCoreStartupParameter.bDSPHLE; g_NetPlaySettings.m_DSPEnableJIT = instance.m_EnableJIT; - for (int i = 0; i < 4; ++i) - { - if (SConfig::GetInstance().m_SIDevice[i] == SIDEVICE_GC_CONTROLLER) - g_NetPlaySettings.m_Controllers |= (1 << i); - if (g_wiimote_sources[i] != WIIMOTE_SRC_NONE) - g_NetPlaySettings.m_Controllers |= (1 << (i + 4)); - } + + for (unsigned int i = 0; i < 4; ++i) + g_NetPlaySettings.m_Controllers[i] = SConfig::GetInstance().m_SIDevice[i]; } // stuff hacked into dolphin @@ -408,8 +404,3 @@ NetPlay* NetPlay::GetNetPlayPtr() { return netplay_ptr; } - -bool NetPlay::IsUsingPad(int pad) -{ - return ((g_NetPlaySettings.m_Controllers & (1 << pad)) != 0); -} \ No newline at end of file diff --git a/Source/Core/Core/Src/NetPlay.h b/Source/Core/Core/Src/NetPlay.h index 08199b21a3..d8ecee016a 100644 --- a/Source/Core/Core/Src/NetPlay.h +++ b/Source/Core/Core/Src/NetPlay.h @@ -36,7 +36,7 @@ struct NetSettings bool m_CPUthread; bool m_DSPHLE; bool m_DSPEnableJIT; - u8 m_Controllers; + u8 m_Controllers[4]; }; extern NetSettings g_NetPlaySettings; @@ -129,7 +129,6 @@ public: u8 GetPadNum(u8 numPAD); static NetPlay* GetNetPlayPtr(); - static bool IsUsingPad(int pad); protected: //void GetBufferedPad(const u8 pad_nb, NetPad* const netvalues); diff --git a/Source/Core/Core/Src/NetPlayClient.cpp b/Source/Core/Core/Src/NetPlayClient.cpp index fb60764256..c72c94efa4 100644 --- a/Source/Core/Core/Src/NetPlayClient.cpp +++ b/Source/Core/Core/Src/NetPlayClient.cpp @@ -196,7 +196,8 @@ unsigned int NetPlayClient::OnData(sf::Packet& packet) packet >> g_NetPlaySettings.m_CPUthread; packet >> g_NetPlaySettings.m_DSPEnableJIT; packet >> g_NetPlaySettings.m_DSPHLE; - packet >> g_NetPlaySettings.m_Controllers; + for (unsigned int i = 0; i < 4; ++i) + packet >> g_NetPlaySettings.m_Controllers[i]; } m_dialog->OnMsgStartGame(); diff --git a/Source/Core/Core/Src/NetPlayServer.cpp b/Source/Core/Core/Src/NetPlayServer.cpp index 90ac6b7f59..d19b6d684a 100644 --- a/Source/Core/Core/Src/NetPlayServer.cpp +++ b/Source/Core/Core/Src/NetPlayServer.cpp @@ -607,8 +607,8 @@ bool NetPlayServer::StartGame(const std::string &path) spac << g_NetPlaySettings.m_CPUthread; spac << g_NetPlaySettings.m_DSPEnableJIT; spac << g_NetPlaySettings.m_DSPHLE; - spac << g_NetPlaySettings.m_Controllers; - + for (unsigned int i = 0; i < 4; ++i) + spac << g_NetPlaySettings.m_Controllers[i]; std::lock_guard lkp(m_crit.players); std::lock_guard lks(m_crit.send);