From 2d5699d62b7acfcd1186d2f7731e97d2cbd39b0a Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Thu, 13 Jan 2022 14:06:51 +0700 Subject: [PATCH] Prevent creating another GameMode Master, since we don't support more than one Master data, and there is no ID related to Master. --- Core/HLE/sceNetAdhoc.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Core/HLE/sceNetAdhoc.cpp b/Core/HLE/sceNetAdhoc.cpp index 63b57a21d7..8e350a7b90 100644 --- a/Core/HLE/sceNetAdhoc.cpp +++ b/Core/HLE/sceNetAdhoc.cpp @@ -4297,6 +4297,9 @@ static int sceNetAdhocGameModeCreateMaster(u32 dataAddr, int size) { if (size < 0 || !Memory::IsValidAddress(dataAddr)) return hleLogError(SCENET, ERROR_NET_ADHOCCTL_INVALID_ARG, "invalid arg"); + if (masterGameModeArea.data) + return hleLogError(SCENET, ERROR_NET_ADHOC_ALREADY_CREATED, "already created"); // FIXME: Should we return a success instead? (need to test this on a homebrew) + hleEatMicro(1000); SceNetEtherAddr localMac; getLocalMac(&localMac);