mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-23 06:10:03 -06:00
fix some of the shittiness when trying to connect more than two players
This commit is contained in:
@ -1407,7 +1407,9 @@ bool CheckRX(int type) // 0=regular 1=MP replies 2=MP host frames
|
|||||||
*(u16*)&RXBuffer[6] = txrate;
|
*(u16*)&RXBuffer[6] = txrate;
|
||||||
*(u16*)&RXBuffer[8] = framelen;
|
*(u16*)&RXBuffer[8] = framelen;
|
||||||
|
|
||||||
if (((framectl & 0x00FF) == 0x0010) && timestamp)
|
bool macgood = (RXBuffer[12 + 4] & 0x01) || MACEqual(&RXBuffer[12 + 4], (u8*)&IOPORT(W_MACAddr0));
|
||||||
|
|
||||||
|
if (((framectl & 0x00FF) == 0x0010) && timestamp && macgood)
|
||||||
{
|
{
|
||||||
// if receiving an association response: get the sync value from the host
|
// if receiving an association response: get the sync value from the host
|
||||||
|
|
||||||
@ -1425,7 +1427,7 @@ bool CheckRX(int type) // 0=regular 1=MP replies 2=MP host frames
|
|||||||
RXTimestamp = 0;
|
RXTimestamp = 0;
|
||||||
StartRX();
|
StartRX();
|
||||||
}
|
}
|
||||||
else if (((framectl & 0x00FF) == 0x00C0) && timestamp && IsMPClient)
|
else if (((framectl & 0x00FF) == 0x00C0) && timestamp && macgood && IsMPClient)
|
||||||
{
|
{
|
||||||
IsMPClient = false;
|
IsMPClient = false;
|
||||||
NextSync = 0;
|
NextSync = 0;
|
||||||
@ -1433,7 +1435,7 @@ bool CheckRX(int type) // 0=regular 1=MP replies 2=MP host frames
|
|||||||
RXTimestamp = 0;
|
RXTimestamp = 0;
|
||||||
StartRX();
|
StartRX();
|
||||||
}
|
}
|
||||||
else if (IsMPClient)
|
else if (macgood && IsMPClient)
|
||||||
{
|
{
|
||||||
// if we are being a MP client, we need to delay this frame until we reach the
|
// if we are being a MP client, we need to delay this frame until we reach the
|
||||||
// timestamp it came with
|
// timestamp it came with
|
||||||
|
@ -555,7 +555,8 @@ u16 RecvReplies(u8* packets, u64 timestamp, u16 aidmask)
|
|||||||
}
|
}
|
||||||
|
|
||||||
myinstmask |= (1 << pktheader.SenderID);
|
myinstmask |= (1 << pktheader.SenderID);
|
||||||
if ((myinstmask & curinstmask) == curinstmask)
|
if (((myinstmask & curinstmask) == curinstmask) ||
|
||||||
|
((ret & aidmask) == aidmask))
|
||||||
{
|
{
|
||||||
// all the clients have sent their reply
|
// all the clients have sent their reply
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user