Auto assign wii controllers in netplay

Just copy the gamecube logic and automatically assign players to the first empty slot.

More consistent with GameCube and helps Android hosts where there is no UI for managing controller mappings currently.
This commit is contained in:
Tom Pratt
2026-07-17 14:04:07 +02:00
parent b6d8bc299e
commit e58f57f6f3

View File

@@ -2272,6 +2272,15 @@ void NetPlayServer::AssignNewUserAPad(const Client& player)
break;
}
}
for (PlayerId& mapping : m_wiimote_map)
{
// 0 means unmapped
if (mapping == 0)
{
mapping = player.pid;
break;
}
}
}
PlayerId NetPlayServer::GiveFirstAvailableIDTo(ENetPeer* player)