Permalink
Browse files

Merge pull request #7248 from Techjar/netplay-fix-spectator-deadlock

NetPlay: Don't update mappings on leave if player had no mappings
  • Loading branch information...
spycrab committed Jul 10, 2018
2 parents 42298f6 + 39449da commit bf4341f7623ab44743315f0c346ebfc8a9e8e960
Showing with 3 additions and 3 deletions.
  1. +3 −3 Source/Core/Core/NetPlayServer.cpp
@@ -366,7 +366,7 @@ unsigned int NetPlayServer::OnConnect(ENetPeer* socket)
// called from ---NETPLAY--- thread
unsigned int NetPlayServer::OnDisconnect(const Client& player)
{
PlayerId pid = player.pid;
const PlayerId pid = player.pid;
if (m_is_running)
{
@@ -405,18 +405,18 @@ unsigned int NetPlayServer::OnDisconnect(const Client& player)
if (mapping == pid)
{
mapping = -1;
UpdatePadMapping();
}
}
UpdatePadMapping();
for (PadMapping& mapping : m_wiimote_map)
{
if (mapping == pid)
{
mapping = -1;
UpdateWiimoteMapping();
}
}
UpdateWiimoteMapping();
return 0;
}

0 comments on commit bf4341f

Please sign in to comment.