4 Commits
Author SHA1 Message Date
92891de261 Fix: PS3 SPU build task (#25)
Fixed PS3 SPU build task

---------

Co-authored-by: 552eden <552eden@gmail.com>
Reviewed-on: pieeebot/cafeberry#25
Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost>
2026-08-06 04:04:50 +00:00
6167e04f82 Disable _LARGE_WORLDS for PS4 (#24)
Temporarily disabled _LARGE_WORLDS to get all platforms communicating with eachother.

---------

Co-authored-by: 552eden <552eden@gmail.com>
Reviewed-on: pieeebot/cafeberry#24
Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost>
2026-08-05 20:02:49 +00:00
0443166b6a fix: vita networking(#23)
VITA Networking is now working. but it can only connect to non LARGE_WORLDS.

---------

Co-authored-by: 552eden <552eden@gmail.com>
Reviewed-on: pieeebot/cafeberry#23
Co-authored-by: ubergamer-pie <16+ubergamer-pie@noreply.localhost>
2026-08-05 16:59:22 +00:00
NaNandpieeebot 4b0520c938 fix PS4 networking support (#20)
gonna mark this a WIP till i test more with large worlds and achievements issues i dont wanna break the PS3 and other builds by enabling it freely,

ideally i can get it to work without it

also i wanna remove the GetLocalIPv4Interfaces auto discovery feature i just did that cause i had so many local networks it got confusing, will remove on Final PR editReviewed-on: pieeebot/cafeberry#20

Co-authored-by: NaN <nan@str1k3r.xyz>
2026-08-04 22:49:46 +00:00
15 changed files with 222 additions and 58 deletions
+3 -1
View File
@@ -1833,6 +1833,7 @@ void ClientConnection::handleEntityActionAtPosition(shared_ptr<EntityActionAtPos
void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
{
app.DebugPrintf("ClientConnection::handlePreLogin ENTER (user %d)\n", m_userIndex);
// printf("Client: handlePreLogin\n");
#if 1
// 4J - Check that we can play with all the players already in the game who have Friends-Only UGC set
@@ -2287,7 +2288,8 @@ void ClientConnection::handlePreLogin(shared_ptr<PreLoginPacket> packet)
}
BOOL allAllowed, friendsAllowed;
ProfileManager.AllowedPlayerCreatedContent(m_userIndex,true,&allAllowed,&friendsAllowed);
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE),
app.DebugPrintf("ClientConnection::handlePreLogin SENDING LoginPacket (user %d)\n", m_userIndex);
send( shared_ptr<LoginPacket>( new LoginPacket(minecraft->user->name, SharedConstants::NETWORK_PROTOCOL_VERSION, offlineXUID, onlineXUID, (allAllowed!=TRUE && friendsAllowed==TRUE),
packet->m_ugcPlayersVersion, app.GetPlayerSkinId(m_userIndex), app.GetPlayerCapeId(m_userIndex), ProfileManager.IsGuest( m_userIndex ))));
if(!g_NetworkManager.IsHost() )
@@ -20,7 +20,8 @@ void terminate_networking() {};
#endif
#if defined __PSVITA__
int socket(int family, int type, int protocol) { return sceNetSocket(NULL, family, type, protocol); };
// every sceNet sample names its sockets - NULL is not a documented value here
int socket(int family, int type, int protocol) { return sceNetSocket("minecraft", family, type, protocol); };
#endif
C4JThread* NetworkSocketLayer::s_acceptThread = NULL;
@@ -59,11 +60,16 @@ std::vector<BYTE> NetworkSocketLayer::s_freeSmallIds;
// only goes true on a successful Initialize(), and a failed one gets retried
static bool s_locksCreated = false;
#if defined _WINDOWS64
bool g_MultiplayerHost = true;
bool g_MultiplayerJoin = false;
#else
bool g_MultiplayerHost = false;
bool g_MultiplayerJoin = true;
#endif
int g_MultiplayerPort = NETWORK_LAN_DEFAULT_PORT;
char g_MultiplayerIP[256] = "127.0.0.1";
char g_MultiplayerIP[256] = "192.168.0.69";
bool NetworkSocketLayer::Initialize()
{
@@ -264,6 +270,9 @@ bool NetworkSocketLayer::HostGame(int port)
SceNetSockaddrIn addr = {};
#else
struct sockaddr_in addr = {};
#endif
#ifdef __PSVITA__
addr.sin_len = sizeof(addr);
#endif
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_ANY);
@@ -588,6 +597,9 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
struct sockaddr_in addr = {};
#endif
#if defined(__ORBIS__) || defined(__PSVITA__)
addr.sin_len = sizeof(addr);
#endif
addr.sin_family = AF_INET;
addr.sin_port = htons((uint16_t)port);
@@ -598,7 +610,7 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
app.DebugPrintf("inet_addr failed for %s:%d\n", ip, port);
return false;
}
#elif defined(__ORBIS__)
#elif defined(__ORBIS__) || defined(__PSVITA__)
if (sceNetInetPton(SCE_NET_AF_INET, ip, &addr.sin_addr.s_addr) <= 0)
{
app.DebugPrintf("inet_addr failed for %s:%d\n", ip, port);
@@ -645,7 +657,15 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
tv.tv_sec = connectTimeoutMs / 1000;
tv.tv_usec = (connectTimeoutMs % 1000) * 1000;
#else
SceNetId eid = sceNetEpollCreate(NULL, 0);
// like sceNetSocket, this takes a name and NULL is not a documented value
SceNetId eid = sceNetEpollCreate("minecraft-connect", 0);
if (eid < 0)
{
app.DebugPrintf("sceNetEpollCreate failed: 0x%08x\n", eid);
closesocket(s_hostConnectionSocket);
s_hostConnectionSocket = INVALID_SOCKET;
continue;
}
SceNetEpollEvent ev = {};
ev.events = SCE_NET_EPOLLOUT;
ev.data.fd = s_hostConnectionSocket;
@@ -665,6 +685,10 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
(outEvents[0].events & (SCE_NET_EPOLLERR | SCE_NET_EPOLLHUP)))
#endif
{
#ifdef __PSVITA__
app.DebugPrintf("epoll wait=%d events=0x%x errno=0x%08x\n",
selectResult, selectResult > 0 ? outEvents[0].events : 0, sys_net_errno);
#endif
app.DebugPrintf("connect() to %s:%d timed out or failed (attempt %d/%d)\n", ip, port, attempt + 1, maxAttempts);
closesocket(s_hostConnectionSocket);
s_hostConnectionSocket = INVALID_SOCKET;
@@ -698,7 +722,12 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
setsockopt(s_hostConnectionSocket, SOL_SOCKET, SCE_NET_SO_NBIO, &blocking, sizeof(blocking));
#endif
#ifdef __PSVITA__
// sceNet takes microseconds
int recvTimeout = 3000 * 1000;
#else
DWORD recvTimeout = 3000;
#endif
setsockopt(s_hostConnectionSocket, SOL_SOCKET, SO_RCVTIMEO, (const char *)&recvTimeout, sizeof(recvTimeout));
/*
iResult = connect(s_hostConnectionSocket, (struct sockaddr*)&addr, sizeof(addr));
@@ -855,7 +884,13 @@ void NetworkSocketLayer::HandleDataReceived(BYTE fromSmallId, BYTE toSmallId, un
INetworkPlayer *pPlayerFrom = g_NetworkManager.GetPlayerBySmallId(fromSmallId);
INetworkPlayer *pPlayerTo = g_NetworkManager.GetPlayerBySmallId(toSmallId);
if (pPlayerFrom == NULL || pPlayerTo == NULL) return;
if (pPlayerFrom == NULL || pPlayerTo == NULL)
{
// dropping here is silent and looks identical to the peer never sending
app.DebugPrintf("LAN: DROPPED %u bytes - from smallId=%d(%s) to smallId=%d(%s)\n",
dataSize, fromSmallId, pPlayerFrom ? "ok" : "NULL", toSmallId, pPlayerTo ? "ok" : "NULL");
return;
}
if (s_isHost)
{
@@ -1125,6 +1160,14 @@ int NetworkSocketLayer::ClientRecvThreadProc(LPVOID param)
break;
}
static int s_recvLogged = 0;
if (s_recvLogged < 20)
{
app.DebugPrintf("LAN: recv %d bytes from host (host=%d local=%d)\n",
packetSize, s_hostSmallId, s_localSmallId);
s_recvLogged++;
}
HandleDataReceived(s_hostSmallId, s_localSmallId, &recvBuf[0], packetSize);
}
@@ -1237,6 +1280,9 @@ int NetworkSocketLayer::AdvertiseThreadProc(LPVOID param)
struct sockaddr_in broadcastAddr;
#endif
memset(&broadcastAddr, 0, sizeof(broadcastAddr));
#ifdef __PSVITA__
broadcastAddr.sin_len = sizeof(broadcastAddr);
#endif
broadcastAddr.sin_family = AF_INET;
broadcastAddr.sin_port = htons(NETWORK_LAN_DISCOVERY_PORT);
broadcastAddr.sin_addr.s_addr = INADDR_BROADCAST;
@@ -1256,6 +1302,38 @@ int NetworkSocketLayer::AdvertiseThreadProc(LPVOID param)
#ifdef __PSVITA__
int sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(const sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
#elif defined _WINDOWS64
//Broadcast on all interfaces.
INTERFACE_INFO ifaces[32];
DWORD ifaceBytes = 0;
int numIfaces = 0;
int sent = SOCKET_ERROR;
if (WSAIoctl(s_advertiseSock, SIO_GET_INTERFACE_LIST, NULL, 0,
ifaces, sizeof(ifaces), &ifaceBytes, NULL, NULL) != SOCKET_ERROR)
{
numIfaces = (int)(ifaceBytes / sizeof(INTERFACE_INFO));
}
for (int i = 0; i < numIfaces; i++)
{
if (!(ifaces[i].iiFlags & IFF_UP)) continue;
if (ifaces[i].iiFlags & IFF_LOOPBACK) continue;
if (!(ifaces[i].iiFlags & IFF_BROADCAST)) continue;
u_long ifIp = ifaces[i].iiAddress.AddressIn.sin_addr.s_addr;
u_long ifMask = ifaces[i].iiNetmask.AddressIn.sin_addr.s_addr;
broadcastAddr.sin_addr.s_addr = (ifIp & ifMask) | ~ifMask;
int r = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
if (r != SOCKET_ERROR) sent = r;
}
if (sent == SOCKET_ERROR)
{
// no interface worked
broadcastAddr.sin_addr.s_addr = INADDR_BROADCAST;
sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
}
#else
int sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
@@ -1310,6 +1388,10 @@ bool NetworkSocketLayer::StartDiscovery()
struct sockaddr_in bindAddr;
#endif
memset(&bindAddr, 0, sizeof(bindAddr));
#ifdef __PSVITA__
// sceNet rejects a sockaddr whose sin_len is unset
bindAddr.sin_len = sizeof(bindAddr);
#endif
bindAddr.sin_family = AF_INET;
bindAddr.sin_port = htons(NETWORK_LAN_DISCOVERY_PORT);
bindAddr.sin_addr.s_addr = INADDR_ANY;
@@ -1336,8 +1418,19 @@ bool NetworkSocketLayer::StartDiscovery()
return false;
}
#endif
#if defined _WINDOWS64 || defined _XBOX
DWORD timeout = 500;
setsockopt(s_discoverySock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(timeout));
#elif defined __PS3__ || defined __ORBIS__
struct timeval timeout;
timeout.tv_sec = 0;
timeout.tv_usec = 500000;
setsockopt(s_discoverySock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(timeout));
#elif defined __PSVITA__
// sceNet wants microseconds in an int here
int timeout = 500000;
setsockopt(s_discoverySock, SOL_SOCKET, SO_RCVTIMEO, (const char *)&timeout, sizeof(timeout));
#endif
s_discovering = true;
s_discoveryThread = new C4JThread(DiscoveryThreadProc, NULL, "DiscoveryThreadProc");
@@ -47,8 +47,8 @@ typedef int SOCKET;
typedef int SOCKET;
#define INVALID_SOCKET -1
#define SO_NBIO SCE_NET_SO_NBIO
#define sys_net_errno sce_net_errno
#define SYS_NET_EINPROGRESS SCE_NET_EINPROGRESS
#define sys_net_errno errno
#define SYS_NET_EINPROGRESS EINPROGRESS
#define socketselect select
#define closesocket sceNetSocketClose
#define socketclose sceNetSocketClose
@@ -229,4 +229,4 @@ private:
extern bool g_MultiplayerHost;
extern bool g_MultiplayerJoin;
extern int g_MultiplayerPort;
extern char g_MultiplayerIP[256];
extern char g_MultiplayerIP[256];
@@ -477,6 +477,8 @@ bool CPlatformNetworkManagerStub::_RunNetworkGame()
{
extern QNET_STATE _iQNetStubState;
_iQNetStubState = QNET_STATE_GAME_PLAY;
if (m_pIQNet->IsHost())
NetworkSocketLayer::UpdateAdvertiseJoinable(true);
for (DWORD i = 0; i < IQNet::s_playerCount; i++)
{
@@ -698,7 +700,7 @@ void CPlatformNetworkManagerStub::SearchForGames()
{
std::vector<LANSession> lanSessions = NetworkSocketLayer::GetDiscoveredSessions();
if (g_MultiplayerJoin)
if (g_MultiplayerJoin && g_MultiplayerIP[0] != '\0')
{
bool alreadyPresent = false;
for (size_t i = 0; i < lanSessions.size(); i++)
@@ -12,7 +12,8 @@ $directories = @(
"PSVITA_GAME\Common\Media",
"PSVITA_GAME\Common\res",
"PSVITA_GAME\PSVita\Sound",
"PSVITA_GAME\PSVita\Tutorial"
"PSVITA_GAME\PSVita\Tutorial",
"PSVITA_GAME\savedata"
)
foreach ($dir in $directories) {
+43 -15
View File
@@ -7,6 +7,7 @@
#include "..\..\MinecraftServer.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.level.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.h"
#include "..\..\Common\Network\NetworkSocketLayer.h"
#define UPDATE_PLAYERS_TIMER_ID 0
#define UPDATE_PLAYERS_TIMER_TIME 30000
@@ -50,7 +51,6 @@ void UIScene_JoinMenu::tick()
g_NetworkManager.GetFullFriendSessionInfo(m_selectedSession, &friendSessionUpdated, this);
m_friendInfoRequestIssued = true;
}
if( m_friendInfoUpdatedOK )
{
m_friendInfoUpdatedOK = false;
@@ -368,6 +368,12 @@ void UIScene_JoinMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege,
void UIScene_JoinMenu::StartSharedLaunchFlow()
{
const bool bManualJoin = (g_MultiplayerJoin == true);
if (bManualJoin)
{
JoinGame(this);
return;
}
#if defined DISABLE_PSN
JoinGame(this);
#else
@@ -421,6 +427,12 @@ int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
// Shared function to join the game that is the same whether we used the sign-in UI or not
void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{
if (pClass == NULL)
{
return;
}
const bool bManualJoin = (g_MultiplayerJoin == true);
DWORD dwSignedInUsers = 0;
bool noPrivileges = false;
DWORD dwLocalUsersMask = 0;
@@ -428,10 +440,14 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
int iPadNotSignedInLive = -1;
ProfileManager.SetLockedProfile(0); // TEMP!
if (bManualJoin)
{
isSignedInLive = true;
}
// If we're in SD mode, then only the primary player gets to play
if (app.IsLocalMultiplayerAvailable())
{
{
for(unsigned int index = 0; index < XUSER_MAX_COUNT; ++index)
{
if(ProfileManager.IsSignedIn(index))
@@ -442,7 +458,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
iPadNotSignedInLive = index;
}
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
if( !bManualJoin && !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(index);
isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(index);
}
@@ -452,7 +468,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{
if(ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad()))
{
if( !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true;
if( !bManualJoin && !ProfileManager.AllowedToPlayMultiplayer(ProfileManager.GetPrimaryPad()) ) noPrivileges = true;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
#ifndef DISABLE_PSN
@@ -467,7 +483,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
}
// If this is an online game but not all players are signed in to Live, stop!
if (!isSignedInLive)
if (!bManualJoin && !isSignedInLive)
{
#ifdef __ORBIS__
// Check if PSN is unavailable because of age restriction
@@ -497,14 +513,22 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
BOOL pccFriendsAllowed = TRUE;
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__PSVITA__))
if(isSignedInLive)
if(!bManualJoin && isSignedInLive)
{
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL);
}
#else
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
if(!bManualJoin)
{
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
}
#endif
if (bManualJoin)
{
noUGC = false;
noPrivileges = false;
}
#ifdef __PSVITA__
@@ -534,13 +558,16 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
ui.RequestErrorMessage( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
}
else
{
#if defined(__ORBIS__) || defined(__PSVITA__)
bool chatRestricted = false;
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
#if defined(__ORBIS__) || defined(__PSVITA__)
if(!bManualJoin)
{
bool chatRestricted = false;
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
if(chatRestricted)
{
ProfileManager.DisplaySystemMessage( SCE_MSG_DIALOG_SYSMSG_TYPE_TRC_PSN_CHAT_RESTRICTION, ProfileManager.GetPrimaryPad() );
}
}
#endif
CGameNetworkManager::eJoinGameResult result = g_NetworkManager.JoinGame( pClass->m_selectedSession, dwLocalUsersMask );
@@ -550,6 +577,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
if( result != CGameNetworkManager::JOINGAME_SUCCESS )
{
pClass->m_bIgnoreInput = false;
int exitReasonStringId = -1;
switch(result)
{
@@ -643,4 +671,4 @@ void UIScene_JoinMenu::handleTimerComplete(int id)
}
break;
};
}
}
@@ -877,6 +877,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
app.SetGameHostOption(eGameHostOption_DisableSaving, m_MoreOptionsParams.bDisableSaving?1:0);
StorageManager.SetSaveDisabled(m_MoreOptionsParams.bDisableSaving);
#ifdef _LARGE_WORLDS
int newWorldSize = 0;
int newHellScale = 0;
switch(m_MoreOptionsParams.newWorldSize)
@@ -909,6 +910,7 @@ void UIScene_LoadMenu::StartSharedLaunchFlow()
app.SetGameNewWorldSize(newWorldSize, bUseMoat);
app.SetGameNewHellScale(newHellScale);
app.SetGameHostOption(eGameHostOption_WorldSize, m_MoreOptionsParams.newWorldSize);
#endif
#endif
@@ -14,6 +14,7 @@
#include "..\..\TexturePackRepository.h"
#include "..\..\TexturePack.h"
#include "..\Network\SessionInfo.h"
#include "..\..\Common\Network\NetworkSocketLayer.h"
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
#include "Common\Network\Sony\SonyHttp.h"
#include "Common\Network\Sony\SonyRemoteStorage.h"
@@ -1385,20 +1386,24 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
if( m_buttonListGames.getItemCount() > 0 && gameIndex < m_currentSessions->size() )
{
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
const bool bManualJoin = (g_MultiplayerJoin == true);
// 4J-PB - is the player allowed to join games?
bool noUGC=false;
bool bContentRestricted=false;
// we're online, since we are joining a game
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&noUGC,&bContentRestricted,NULL);
// A direct LAN join should probnot use PSN matchmaking or account privileges (nansess)
if(!bManualJoin)
{
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&noUGC,&bContentRestricted,NULL);
}
#ifdef __ORBIS__
// 4J Stu - On PS4 we don't restrict playing multiplayer based on chat restriction, so remove this check
noUGC = false;
bool bPlayStationPlus=true;
int iPadWithNoPlaystationPlus=0;
bool isSignedInLive = true;
int iPadWithNoPlaystationPlus=-1;
bool isSignedInLive = true;
int iPadNotSignedInLive = -1;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i)
{
@@ -1414,6 +1419,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
if(ProfileManager.HasPlayStationPlus(i)==false)
{
bPlayStationPlus=false;
iPadWithNoPlaystationPlus = (int)i;
break;
}
}
@@ -1427,7 +1433,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
}
#endif
if(noUGC)
if(!bManualJoin && noUGC)
{
// not allowed to join
#ifndef __PSVITA__
@@ -1443,7 +1449,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
m_bIgnoreInput=false;
return;
}
else if(bContentRestricted)
else if(!bManualJoin && bContentRestricted)
{
ui.RequestContentRestrictedMessageBox();
@@ -1452,7 +1458,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
}
#ifdef __ORBIS__
// If this is an online game but not all players are signed in to Live, stop!
else if (!isSignedInLive)
else if (!bManualJoin && !isSignedInLive)
{
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
@@ -1471,7 +1477,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
}
return;
}
else if(bPlayStationPlus==false)
else if(!bManualJoin && bPlayStationPlus==false)
{
if(ProfileManager.RequestingPlaystationPlus(iPadWithNoPlaystationPlus))
@@ -1480,6 +1486,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
UINT uiIDA[1];
uiIDA[0]=IDS_OK;
ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
m_bIgnoreInput=false;
return;
}
@@ -8,6 +8,7 @@
#include "UIScene_MainMenu.h"
#ifdef __ORBIS__
#include <error_dialog.h>
#include "..\..\Common\Network\NetworkSocketLayer.h"
#endif
Random *UIScene_MainMenu::random = new Random();
@@ -318,7 +319,16 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
//CD - Added for audio
ui.PlayUISFX(eSFX_Press);
ProfileManager.RefreshChatAndContentRestrictions(RefreshChatAndContentRestrictionsReturned_PlayGame, this);
if(g_MultiplayerJoin)
{
// request only completes after the platform network timeout.
// this needs to be done before hand or else the PS4 crashes ill need to look more into this
CreateLoad_SignInReturned(this, true, primaryPad);
}
else
{
ProfileManager.RefreshChatAndContentRestrictions(RefreshChatAndContentRestrictionsReturned_PlayGame, this);
}
}
#else
m_eAction=eAction_RunGame;
@@ -1098,6 +1108,12 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
int primaryPad = ProfileManager.GetPrimaryPad();
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
const bool bManualJoin = (g_MultiplayerJoin == true);
if (bManualJoin)
{
CreateLoad_SignInReturned(pClass, true, primaryPad);
return;
}
int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL;
+8 -8
View File
@@ -810,7 +810,7 @@
<Message>Run PS3 postbuild script</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=Debug /v:minimal</Command>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=Debug /p:Platform=PS3 /v:minimal</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>Build PS3 SPU Tasks</Message>
@@ -905,7 +905,7 @@
<Message>Run PS3 postbuild script</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=Release /v:minimal</Command>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=Release /p:Platform=PS3 /v:minimal</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>Build PS3 SPU Tasks</Message>
@@ -1027,7 +1027,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG_MENUS_ENABLED;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling>
<AdditionalIncludeDirectories>Windows64\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
@@ -1358,7 +1358,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<Message>Run PS3 postbuild script</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=ContentPackage /v:minimal</Command>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=ContentPackage /p:Platform=PS3 /v:minimal</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>Build PS3 SPU Tasks</Message>
@@ -1455,7 +1455,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<Message>Run PS3 postbuild script</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=ContentPackage /v:minimal</Command>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=ContentPackage /p:Platform=PS3 /v:minimal</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>Build PS3 SPU Tasks</Message>
@@ -1560,7 +1560,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<Message>Run PS3 postbuild script</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=Release /v:minimal</Command>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=Release /p:Platform=PS3 /v:minimal</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>Build PS3 SPU Tasks</Message>
@@ -1657,7 +1657,7 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<Message>Run PS3 postbuild script</Message>
</PostBuildEvent>
<PreLinkEvent>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=ContentPackage /v:minimal</Command>
<Command>"C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" "$(ProjectDir)PS3\SPU_Tasks\SPU_Tasks.sln" /p:Configuration=ContentPackage /p:Platform=PS3 /v:minimal</Command>
</PreLinkEvent>
<PreLinkEvent>
<Message>Build PS3 SPU Tasks</Message>
@@ -2092,7 +2092,7 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<OptimizationLevel>Level2</OptimizationLevel>
<AdditionalIncludeDirectories>Orbis\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>SPLIT_SAVES;_LARGE_WORLDS;_EXTENDED_ACHIEVEMENTS;_DEBUG_MENUS_ENABLED</PreprocessorDefinitions>
<PreprocessorDefinitions>SPLIT_SAVES;_EXTENDED_ACHIEVEMENTS;_DEBUG_MENUS_ENABLED</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>..\Minecraft.World\ORBIS_Release\Minecraft.World.a;Orbis\4JLibs\libs\4j_Render.a;Orbis\4JLibs\libs\4j_Input_r.a;Orbis\4JLibs\libs\4J_Storage_r.a;Orbis\4JLibs\libs\4J_Profile_r.a;Orbis\Iggy\lib\libiggy_orbis.a;Orbis\Miles\lib\mssorbis.a;Orbis\Miles\lib\binkaorbis.a;Common\Network\Sony\sceRemoteStorage\ps4\lib\sceRemoteStorage.a;-lSceGnmDriver_stub_weak;-lSceGnmx;-lSceGnm;-lSceGpuAddress;-lSceCes;-lSceVideoOut_stub_weak;-lScePad_stub_weak;-lScePngDec_stub_weak;-lScePngEnc_stub_weak;-lSceFios2_stub_weak;-lSceUlt_stub_weak;-lSceShaderBinary;-lSceUserService_stub_weak;-lSceSysmodule_stub_weak;-lSceImeDialog_stub_weak;-lScePosix_stub_weak;-lSceAudioOut_stub_weak;-lSceSaveData_stub_weak;-lSceRtc_stub_weak;-lSceSystemService_stub_weak;-lSceNetCtl_stub_weak;-lSceNpCommon_stub_weak;-lSceNpManager_stub_weak;-lSceNpToolkit;-lSceNpToolkitUtils;-lSceNpWebApi_stub_weak;-lSceNpAuth_stub_weak;-lSceNpTrophy_stub_weak;-lSceInvitationDialog_stub_weak;-lSceGameCustomDataDialog_stub_weak;-lSceNpCommerce_stub_weak;-lSceNet_stub_weak;-lSceHttp_stub_weak;-lSceSsl_stub_weak;-lSceNpMatching2_stub_weak;-lSceNpTus_stub_weak;-lSceNpUtility_stub_weak;-lSceNpScore_stub_weak;-lSceCommonDialog_stub_weak;-lSceNpSns_stub_weak;-lSceNpSnsFacebookDialog_stub_weak;-lSceRudp_stub_weak;-lSceAppContent_stub_weak;-lSceVoice_stub_weak;-lSceAudioIn_stub_weak;-lSceRemoteplay_stub_weak;-lSceSaveDataDialog_stub_weak;-lSceErrorDialog_stub_weak;-lSceMsgDialog_stub_weak;-lSceGameLiveStreaming_stub_weak;%(AdditionalDependencies)</AdditionalDependencies>
@@ -619,7 +619,6 @@ DWORD GetFileAttributesA(LPCSTR lpFileName)
SceFiosStat statData;
if(sceFiosStatSync(NULL, filePath, &statData) != SCE_FIOS_OK)
{
app.DebugPrintf("*** sceFiosStatSync Failed\n");
return -1;
}
if(statData.statFlags & SCE_FIOS_STATUS_DIRECTORY )
@@ -671,19 +670,25 @@ BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
#ifndef _FINAL_BUILD
VOID OutputDebugStringW(LPCWSTR lpOutputString)
{
wprintf(lpOutputString);
VOID OutputDebugStringW(LPCWSTR lpOutputString)
{
if (lpOutputString != NULL)
wprintf(L"%ls", lpOutputString);
fflush(stdout);
}
VOID OutputDebugStringA(LPCSTR lpOutputString)
{
printf(lpOutputString);
VOID OutputDebugStringA(LPCSTR lpOutputString)
{
if (lpOutputString != NULL)
printf("%s", lpOutputString);
fflush(stdout);
}
VOID OutputDebugString(LPCSTR lpOutputString)
{
printf(lpOutputString);
VOID OutputDebugString(LPCSTR lpOutputString)
{
if (lpOutputString != NULL)
printf("%s", lpOutputString);
fflush(stdout);
}
#endif // _CONTENT_PACKAGE
@@ -787,4 +792,4 @@ DWORD XGetLocale()
DWORD XEnableGuestSignin(BOOL fEnable)
{
return 0;
}
}
@@ -1060,6 +1060,7 @@ int main(int argc, const char *argv[] )
// ProfileManager for XN_LIVE_INVITE_ACCEPTED for QNet.
g_NetworkManager.Initialise();
NetworkSocketLayer::Initialize();
// debug switch to trial version
ProfileManager.SetDebugFullOverride(true);
Binary file not shown.
+2 -2
View File
@@ -858,7 +858,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_DEBUG_MENUS_ENABLED;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_LARGE_WORLDS;_DEBUG_MENUS_ENABLED;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<ShowIncludes>false</ShowIncludes>
@@ -1447,7 +1447,7 @@
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<CppExceptions>true</CppExceptions>
<OptimizationLevel>Level2</OptimizationLevel>
<PreprocessorDefinitions>SPLIT_SAVES;_LARGE_WORLDS;_EXTENDED_ACHIEVEMENTS;DEBUG_MENUS_ENABLED</PreprocessorDefinitions>
<PreprocessorDefinitions>SPLIT_SAVES;_EXTENDED_ACHIEVEMENTS;DEBUG_MENUS_ENABLED</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ContentPackage|ORBIS'">
+8 -1
View File
@@ -20,9 +20,16 @@ void SetThreadName( DWORD dwThreadID, LPCSTR szThreadName )
info.dwFlags = 0;
#if ( defined _WINDOWS64 | defined _DURANGO )
// 0x406D1388 is a debugger protocol, not a real exception - only a debugger
// can consume it. With nothing attached it terminates the process.
if( !IsDebuggerPresent() )
return;
__try
{
RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(DWORD), (ULONG_PTR *)&info );
// count is in ULONG_PTRs, not DWORDs - on x64 the DWORD count made
// RaiseException read past the end of info
RaiseException( 0x406D1388, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR *)&info );
}
__except( GetExceptionCode()==0x406D1388 ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_EXECUTE_HANDLER )
{