mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-08 03:28:31 +03:00
NetPlay: Return mapping arrays and player list vectors directly
Simplifies pad map dialog initialization
This commit is contained in:
parent
b1af2a6bbc
commit
11f3ded296
7 changed files with 55 additions and 53 deletions
|
@ -403,31 +403,27 @@ unsigned int NetPlayServer::OnDisconnect(Client& player)
|
|||
}
|
||||
|
||||
// called from ---GUI--- thread
|
||||
void NetPlayServer::GetPadMapping(PadMapping map[4])
|
||||
PadMappingArray NetPlayServer::GetPadMapping() const
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
map[i] = m_pad_map[i];
|
||||
return m_pad_map;
|
||||
}
|
||||
|
||||
void NetPlayServer::GetWiimoteMapping(PadMapping map[4])
|
||||
PadMappingArray NetPlayServer::GetWiimoteMapping() const
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
map[i] = m_wiimote_map[i];
|
||||
return m_wiimote_map;
|
||||
}
|
||||
|
||||
// called from ---GUI--- thread
|
||||
void NetPlayServer::SetPadMapping(const PadMapping map[4])
|
||||
void NetPlayServer::SetPadMapping(const PadMappingArray& mappings)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
m_pad_map[i] = map[i];
|
||||
m_pad_map = mappings;
|
||||
UpdatePadMapping();
|
||||
}
|
||||
|
||||
// called from ---GUI--- thread
|
||||
void NetPlayServer::SetWiimoteMapping(const PadMapping map[4])
|
||||
void NetPlayServer::SetWiimoteMapping(const PadMappingArray& mappings)
|
||||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
m_wiimote_map[i] = map[i];
|
||||
m_wiimote_map = mappings;
|
||||
UpdateWiimoteMapping();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue