fix relay + built-in server warning reading stale serverHasRelay

This commit is contained in:
Katharine Chui committed 2026-10-21 14:19:55 +02:00
1 parent 3c35584f47
commit b8297795ef
1 file changed
+2 -2
+2 -2
View File
@@ -2069,6 +2069,8 @@ u32 sceNetAdhocInit(MIPSState *mips) {
// Since we are deleting GameMode Master here, we should probably need to make sure GameMode resources all cleared too.
deleteAllGMB();
SetupAdhocRelayMode();
auto n = GetI18NCategory(I18NCat::NETWORKING);
if (g_Config.bAdhocUseUdp && g_Config.bEnableAdhocServer) {
g_OSD.Show(OSDType::MESSAGE_WARNING, n->T("Built-in adhoc server does not currently support UDP"), 20.0f, "udp built-in server warning");
@@ -2078,8 +2080,6 @@ u32 sceNetAdhocInit(MIPSState *mips) {
g_OSD.Show(OSDType::MESSAGE_WARNING, n->T("Built-in adhoc server does not currently support relay"), 20.0f, "relay built-in server warning");
}
SetupAdhocRelayMode();
if (g_Config.bEnableWlan) {
std::string_view modeStr = serverHasRelay ? n->T("Relay server mode") : n->T("P2P mode");
g_OSD.Show(OSDType::MESSAGE_INFO, ApplySafeSubstitutions("%1: %2", n->T("Ad Hoc multiplayer"), modeStr), 0.0f, "adhoc started");