From 79d31d4b85bffd261bda8e64aff0ea506fc0dc4d Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Wed, 8 Dec 2021 04:34:17 +0700 Subject: [PATCH] Allow Sending PDP to non-existing MAC address (except invalid mac address). Fixes an issue on NBA Ballers Rebound where players unable to enter Multiplayer Menu again after getting connection issue. --- Core/HLE/sceNetAdhoc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 37339d251b..c16832e63a 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -1508,7 +1508,7 @@ static int sceNetAdhocPdpSend(int id, const char *mac, u32 port, void *data, int // Valid Data Buffer if (data != NULL) { // Valid Destination Address - if (daddr != NULL) { + if (daddr != NULL && !isZeroMAC(daddr)) { // Log Destination // Schedule Timeout Removal //if (flag) timeout = 0; @@ -1580,7 +1580,8 @@ static int sceNetAdhocPdpSend(int id, const char *mac, u32 port, void *data, int // Does PDP can Timeout? There is no concept of Timeout when sending UDP due to no ACK, but might happen if the socket buffer is full, not sure about PDP since some games did use the timeout arg return hleLogDebug(SCENET, ERROR_NET_ADHOC_TIMEOUT, "timeout?"); // ERROR_NET_ADHOC_INVALID_ADDR; } - //VERBOSE_LOG(SCENET, "sceNetAdhocPdpSend[%i:%u]: Unknown Target Peer %s:%u\n", id, getLocalPort(pdpsocket.id), mac2str(daddr, tmpmac), ntohs(target.sin_port)); + VERBOSE_LOG(SCENET, "sceNetAdhocPdpSend[%i:%u]: Unknown Target Peer %s:%u (faking success)\n", id, getLocalPort(pdpsocket.id), mac2str(daddr).c_str(), ntohs(target.sin_port)); + return 0; // faking success } // Broadcast Target