mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 01:59:34 +01:00
sceNetAdhocctlGetPeerInfo: NO_ENTRY for the local MAC
The console itself isn't in its peer list, and a PSP returns NO_ENTRY for it (pspautotests net/adhoc/adhocctl). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
874080ced2
commit
db7c9ede34
1 file changed
+2
-14
@@ -3994,21 +3994,9 @@ int sceNetAdhocctlGetPeerInfo(MIPSState *mips, const char *mac, int size, u32 pe
|
||||
|
||||
int retval = SCE_NET_ADHOC_ERROR_NO_ENTRY; // -1;
|
||||
|
||||
// Local MAC
|
||||
// The local MAC isn't in the peer list, so NO_ENTRY (pspautotests net/adhoc/adhocctl).
|
||||
if (isLocalMAC(maddr)) {
|
||||
SceNetAdhocctlNickname nickname;
|
||||
|
||||
truncate_cpy((char*)&nickname.data, ADHOCCTL_NICKNAME_LEN, g_Config.sNickName);
|
||||
buf->next = 0;
|
||||
buf->nickname = nickname;
|
||||
buf->nickname.data[ADHOCCTL_NICKNAME_LEN - 1] = 0; // last char need to be null-terminated char
|
||||
buf->mac_addr = *maddr;
|
||||
buf->flags = 0x0400;
|
||||
buf->padding = 0;
|
||||
buf->last_recv = std::max(0LL, static_cast<s64>(CoreTiming::GetGlobalTimeUsScaled() - defaultLastRecvDelta));
|
||||
|
||||
// Success
|
||||
retval = 0;
|
||||
retval = SCE_NET_ADHOC_ERROR_NO_ENTRY;
|
||||
}
|
||||
// Find Peer by MAC
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user