add ps4 support

This commit is contained in:
2026-08-02 22:06:27 +03:00
parent 94f1cefcf9
commit 92209cf909
36 changed files with 257 additions and 123 deletions
@@ -5,9 +5,7 @@
#include "..\..\Xbox\Network\NetworkPlayerXbox.h" // TODO - stub version of this?
#include "..\..\Minecraft.h"
#include "..\..\User.h"
#if defined _WINDOWS64 || defined __PS3__ || defined _XBOX
#include "..\..\Common\Network\WinsockNetLayer.h"
#endif
CPlatformNetworkManagerStub *g_pPlatformNetworkManager;
@@ -770,8 +768,13 @@ void CPlatformNetworkManagerStub::SearchForGames()
}
}
#ifdef __ORBIS__
SceNetInAddr ip_addr = {};
sceNetInetPton(SCE_NET_AF_INET, lanSessions[i].hostIP, &ip_addr);
info->sessionId = (ULONGLONG)((uint64_t)ip_addr.s_addr | ((uint64_t)lanSessions[i].hostPort << 32));
#else
info->sessionId = (ULONGLONG)((unsigned __int64)inet_addr(lanSessions[i].hostIP) | ((unsigned __int64)lanSessions[i].hostPort << 32));
#endif
friendsSessions[0].push_back(info);
}