mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-04 13:23:49 +01:00
Merge pull request #13198 from ANR2ME/adhocmatching_fix
AdhocMatching fix 3rd Player issue
This commit is contained in:
2 files changed
+10
-10
No files matched your search
@@ -484,8 +484,8 @@ void postAcceptAddSiblings(SceNetAdhocMatchingContext * context, int siblingcoun
|
||||
context->peerlist = sibling;
|
||||
peerlock.unlock();
|
||||
|
||||
// Spawn Established Event
|
||||
spawnLocalEvent(context, PSP_ADHOC_MATCHING_EVENT_ESTABLISHED, &sibling->mac, 0, NULL);
|
||||
// Spawn Established Event. FIXME: ESTABLISHED event should only be triggered for Parent/P2P peer?
|
||||
//spawnLocalEvent(context, PSP_ADHOC_MATCHING_EVENT_ESTABLISHED, &sibling->mac, 0, NULL);
|
||||
|
||||
INFO_LOG(SCENET, "Accepting Peer %s", mac2str(&sibling->mac).c_str());
|
||||
}
|
||||
@@ -989,9 +989,9 @@ void AfterMatchingMipsCall::run(MipsCall &call) {
|
||||
}
|
||||
u32 v0 = currentMIPS->r[MIPS_REG_V0];
|
||||
if (__IsInInterrupt()) ERROR_LOG(SCENET, "AfterMatchingMipsCall::run [ID=%i][Event=%d] is Returning Inside an Interrupt!", contextID, EventID);
|
||||
if (Memory::IsValidAddress(bufAddr)) userMemory.Free(bufAddr);
|
||||
//SetMatchingInCallback(context, false);
|
||||
DEBUG_LOG(SCENET, "AfterMatchingMipsCall::run [ID=%i][Event=%d] [cbId: %u][retV0: %08x]", contextID, EventID, call.cbId, v0);
|
||||
DEBUG_LOG(SCENET, "AfterMatchingMipsCall::run [ID=%i][Event=%d][%s] [cbId: %u][retV0: %08x]", contextID, EventID, mac2str((SceNetEtherAddr*)Memory::GetPointer(bufAddr)).c_str(), call.cbId, v0);
|
||||
if (Memory::IsValidAddress(bufAddr)) userMemory.Free(bufAddr);
|
||||
//call.setReturnValue(v0);
|
||||
}
|
||||
|
||||
|
||||
@@ -4063,7 +4063,7 @@ void __NetMatchingCallbacks() //(int matchingId)
|
||||
|
||||
//if (/*__KernelGetCurThread() == context->matching_thid &&*/ (!__IsInInterrupt() && __KernelIsDispatchEnabled() && !__KernelInCallback()) /*&& !IsMatchingInCallback(context)*/)
|
||||
{
|
||||
DEBUG_LOG(SCENET, "AdhocMatchingCallback: [ID=%i][EVENT=%i]", args[0], args[1]);
|
||||
DEBUG_LOG(SCENET, "AdhocMatchingCallback: [ID=%i][EVENT=%i][%s]", args[0], args[1], mac2str((SceNetEtherAddr*)Memory::GetPointer(args[2])).c_str());
|
||||
AfterMatchingMipsCall* after = (AfterMatchingMipsCall*)__KernelCreateAction(actionAfterMatchingMipsCall);
|
||||
after->SetData(args[0], args[1], args[2]);
|
||||
//SetMatchingInCallback(context, true);
|
||||
@@ -4734,9 +4734,9 @@ void sendBirthPacket(SceNetAdhocMatchingContext * context, SceNetEtherAddr * mac
|
||||
|
||||
// Log Send Success
|
||||
if (sent >= 0)
|
||||
INFO_LOG(SCENET, "InputLoop: Sending BIRTH to %s", mac2str(&peer->mac).c_str());
|
||||
INFO_LOG(SCENET, "InputLoop: Sending BIRTH [%s] to %s", mac2str(mac).c_str(), mac2str(&peer->mac).c_str());
|
||||
else
|
||||
WARN_LOG(SCENET, "InputLoop: Failed to Send BIRTH to %s", mac2str(&peer->mac).c_str());
|
||||
WARN_LOG(SCENET, "InputLoop: Failed to Send BIRTH [%s] to %s", mac2str(mac).c_str(), mac2str(&peer->mac).c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5278,8 +5278,8 @@ void actOnBirthPacket(SceNetAdhocMatchingContext * context, SceNetEtherAddr * se
|
||||
|
||||
peerlock.unlock();
|
||||
|
||||
// Spawn Established Event
|
||||
spawnLocalEvent(context, PSP_ADHOC_MATCHING_EVENT_ESTABLISHED, &sibling->mac, 0, NULL);
|
||||
// Spawn Established Event. FIXME: ESTABLISHED event should only be triggered for Parent/P2P peer?
|
||||
//spawnLocalEvent(context, PSP_ADHOC_MATCHING_EVENT_ESTABLISHED, &sibling->mac, 0, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5422,7 +5422,7 @@ int matchingEventThread(int matchingId)
|
||||
if (msg->optlen > 0) opt = ((u8*)msg) + sizeof(ThreadMessage); //&msg[1]
|
||||
|
||||
// Log Matching Events
|
||||
INFO_LOG(SCENET, "EventLoop[%d]: Matching Event [%d=%s] OptSize=%d", matchingId, msg->opcode, getMatchingEventStr(msg->opcode), msg->optlen);
|
||||
INFO_LOG(SCENET, "EventLoop[%d]: Matching Event [%d=%s][%s] OptSize=%d", matchingId, msg->opcode, getMatchingEventStr(msg->opcode), mac2str(&msg->mac).c_str(), msg->optlen);
|
||||
|
||||
// Unlock to prevent race-condition with other threads due to recursive lock
|
||||
context->eventlock->unlock();
|
||||
|
||||
Reference in new issue
Block a user