Merge pull request #7248 from Techjar/netplay-fix-spectator-deadlock
NetPlay: Don't update mappings on leave if player had no mappings
This commit is contained in:
commit
bf4341f762
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue