From b36cf60495c7128311c5dff021c1413ca751a8ec Mon Sep 17 00:00:00 2001 From: dyrk <53305754+dyrkuwu@users.noreply.github.com> Date: Wed, 4 Mar 2026 19:46:10 +0300 Subject: [PATCH] add the supplied server to the ui --- .../Network/PlatformNetworkManagerStub.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp index c2466fe39..c9af72e51 100644 --- a/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp +++ b/Minecraft.Client/Common/Network/PlatformNetworkManagerStub.cpp @@ -730,6 +730,24 @@ void CPlatformNetworkManagerStub::SearchForGames() friendsSessions[0].push_back(info); } + if (g_Win64MultiplayerIP[0] != 0) + { + FriendSessionInfo* info = new FriendSessionInfo(); + wchar_t label[128]; + swprintf_s(label, L"%S:%d", g_Win64MultiplayerIP, g_Win64MultiplayerPort); + size_t nameLen = wcslen(label); + info->displayLabel = new wchar_t[nameLen + 1]; + wcscpy_s(info->displayLabel, nameLen + 1, label); + info->displayLabelLength = (unsigned char)nameLen; + info->displayLabelViewableStartIndex = 0; + info->data.isReadyToJoin = true; + info->data.isJoinable = true; + strncpy_s(info->data.hostIP, sizeof(info->data.hostIP), g_Win64MultiplayerIP, _TRUNCATE); + info->data.hostPort = g_Win64MultiplayerPort; + info->sessionId = (SessionID)((unsigned __int64)inet_addr(g_Win64MultiplayerIP) | ((unsigned __int64)g_Win64MultiplayerPort << 32)); + friendsSessions[0].push_back(info); + } + m_searchResultsCount[0] = (int)friendsSessions[0].size(); if (m_SessionsUpdatedCallback != NULL)