From 30b9f46aa5cd1c44ee8b741d5f77a96bc41e4402 Mon Sep 17 00:00:00 2001 From: ANR2ME Date: Mon, 19 Oct 2020 22:46:25 +0700 Subject: [PATCH] Don't need to connect if AdhocServer IP is the same with this instance localhost IP and having AdhocServer disabled --- Core/HLE/proAdhoc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp index 2a45abdc45..c408aa8b52 100644 --- a/Core/HLE/proAdhoc.cpp +++ b/Core/HLE/proAdhoc.cpp @@ -2083,6 +2083,10 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){ if (g_adhocServerIP.in.sin_addr.s_addr == INADDR_NONE) return -1; + // Don't need to connect if AdhocServer IP is the same with this instance localhost IP and having AdhocServer disabled + if (g_adhocServerIP.in.sin_addr.s_addr == g_localhostIP.in.sin_addr.s_addr && !g_Config.bEnableAdhocServer) + return -1; + // Connect to Adhoc Server int errorcode = 0; int cnt = 0;