Fix connection issue on Dynasty Warriors (Shin Sangoku Musou) games when playing with more than 2 players.

This commit is contained in:
ANR2ME committed 2021-01-30 15:20:24 +07:00
1 parent 54849075aa
commit d907906c74
3 files changed
+12 -7

No files matched your search

+1 -1
View File
@@ -3103,7 +3103,7 @@ static int sceNetAdhocPtpOpen(const char *srcmac, int sport, const char *dstmac,
// Valid Addresses. FIXME: MAC only valid after successful attempt to Create/Connect/Join a Group? (ie. adhocctlCurrentMode != ADHOCCTL_MODE_NONE)
if ((adhocctlCurrentMode != ADHOCCTL_MODE_NONE) && saddr != NULL && isLocalMAC(saddr) && daddr != NULL && !isBroadcastMAC(daddr) && !isZeroMAC(daddr)) {
// Dissidia 012 will try to reOpen the port without Closing the old one first when PtpConnect failed to try again.
if (isPTPPortInUse(sport, false)) {
if (isPTPPortInUse(sport, false, daddr, dport)) {
// FIXME: When PORT_IN_USE error occured it seems the index to the socket id also increased, which means it tries to create & bind the socket first and then closes it due to failed to bind
return hleLogDebug(SCENET, ERROR_NET_ADHOC_PORT_IN_USE, "port in use");
}