Fix an issue where sceNetAdhocGameModeCreateReplica blocked current thread for initial sync while Master data hasn't been created yet.

This commit is contained in:
ANR2ME committed 2022-01-13 13:03:58 +07:00
1 parent 9efdaf9ba7
commit 4d0c7385ec
1 file changed
+1 -1
+1 -1
View File
@@ -4365,7 +4365,7 @@ static int sceNetAdhocGameModeCreateReplica(const char *mac, u32 dataAddr, int s
ret = gma.id; // Valid id for replica is higher than 0?
// Block current thread to sync initial master data after Master and all Replicas have been created
if (replicaGameModeAreas.size() == (gameModeMacs.size() - 1)) {
if (masterGameModeArea.data != NULL && replicaGameModeAreas.size() == (gameModeMacs.size() - 1)) {
if (CoreTiming::IsScheduled(gameModeNotifyEvent)) {
__KernelWaitCurThread(WAITTYPE_NET, GAMEMODE_WAITID, ret, 0, false, "syncing master data");
DEBUG_LOG(SCENET, "GameMode: Blocking Thread %d to Sync initial Master data", __KernelGetCurThread());