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
@@ -54,7 +54,7 @@ void IUIScene_StartGame::HandleDLCMountingComplete()
for(unsigned int i = 0; i < app.GetDLCInfoTexturesOffersCount(); ++i)
{
bTexturePackAlreadyListed=false;
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
char *pchName=app.GetDLCInfoTextures(i);
pDLCInfo=app.GetDLCInfo(pchName);
#elif defined _XBOX_ONE
@@ -1392,17 +1392,21 @@ int UIScene_CreateWorldMenu::ConfirmCreateReturned(void *pParam,int iPad,C4JStor
return 0;
}
#ifdef __ORBIS__
#if defined(__ORBIS__)
int UIScene_CreateWorldMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
UIScene_CreateWorldMenu* pClass = (UIScene_CreateWorldMenu *)pParam;
pClass->m_bIgnoreInput = false;
#ifdef DISABLE_PSN
UIScene_CreateWorldMenu::StartGame_SignInReturned(pClass, true, iPad);
#else
if(result==C4JStorage::EMessage_ResultAccept)
{
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_CreateWorldMenu::StartGame_SignInReturned, pClass, false, iPad);
}
#endif
return 0;
}
@@ -253,7 +253,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
}
break;
case ACTION_MENU_Y:
#if defined(__PS3__) || defined(__ORBIS__)
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__))
if(pressed && iPad == ProfileManager.GetPrimaryPad())
{
#ifdef __PS3__
@@ -290,7 +290,7 @@ void UIScene_InGameInfoMenu::handleInput(int iPad, int key, bool repeat, bool pr
{
#ifdef __PSVITA__
PSVITA_STUBBED;
#else
#elif !defined(DISABLE_PSN)
ProfileManager.ShowProfileCard(iPad,uid);
#endif
}
@@ -59,7 +59,7 @@ void UIScene_JoinMenu::tick()
m_buttonListPlayers.init(eControl_GamePlayers);
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined __PSVITA__)
for( int i = 0; i < MINECRAFT_NET_MAX_PLAYERS; i++ )
{
if( m_selectedSession->data.players[i] != NULL )
@@ -368,7 +368,7 @@ void UIScene_JoinMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege,
void UIScene_JoinMenu::StartSharedLaunchFlow()
{
#if defined DISABLE_PSN && defined __PS3__
#if defined DISABLE_PSN
JoinGame(this);
#else
if(!app.IsLocalMultiplayerAvailable())
@@ -391,7 +391,7 @@ int UIScene_JoinMenu::StartGame_SignInReturned(void *pParam,bool bContinue, int
{
UIScene_JoinMenu* pClass = (UIScene_JoinMenu*)ui.GetSceneFromCallbackId((size_t)pParam);
#if defined DISABLE_PSN && defined __PS3__
#if defined DISABLE_PSN
JoinGame(pClass);
return 0;
#else
@@ -496,7 +496,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
BOOL pccAllowed = TRUE;
BOOL pccFriendsAllowed = TRUE;
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__PSVITA__)
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__PSVITA__))
if(isSignedInLive)
{
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL);
@@ -1784,17 +1784,20 @@ void UIScene_LoadMenu::handleGainFocus(bool navBack)
}
}
#ifdef __ORBIS__
#if defined __ORBIS__
int UIScene_LoadMenu::MustSignInReturnedPSN(void *pParam,int iPad,C4JStorage::EMessageResult result)
{
UIScene_LoadMenu* pClass = (UIScene_LoadMenu *)pParam;
pClass->m_bIgnoreInput = false;
#ifdef DISABLE_PSN
UIScene_LoadMenu::StartGame_SignInReturned(pParam, true, iPad);
#else
if(result==C4JStorage::EMessage_ResultAccept)
{
SQRNetworkManager_Orbis::AttemptPSNSignIn(&UIScene_LoadMenu::StartGame_SignInReturned, pClass, false, iPad);
}
#endif
return 0;
}
@@ -1013,7 +1013,7 @@ void UIScene_LoadOrJoinMenu::handleInput(int iPad, int key, bool repeat, bool pr
#endif
break;
case ACTION_MENU_Y:
#if defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__)
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__PSVITA__) || defined(__ORBIS__))
m_eAction = eAction_ViewInvites;
if(pressed && iPad == ProfileManager.GetPrimaryPad())
{
@@ -2414,6 +2414,7 @@ int UIScene_LoadOrJoinMenu::PSN_SignInReturned(void *pParam,bool bContinue, int
// Check if we're signed in to LIVE
if(ProfileManager.IsSignedInLive(iPad))
{
#ifndef DISABLE_PSN
#if defined(__PS3__)
int ret = sceNpBasicRecvMessageCustom(SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE, SCE_NP_BASIC_RECV_MESSAGE_OPTIONS_INCLUDE_BOOTABLE, SYS_MEMORY_CONTAINER_ID_INVALID);
app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret);
@@ -2421,6 +2422,7 @@ int UIScene_LoadOrJoinMenu::PSN_SignInReturned(void *pParam,bool bContinue, int
SQRNetworkManager_Vita::RecvInviteGUI();
#else
SQRNetworkManager_Orbis::RecvInviteGUI();
#endif
#endif
}
break;
@@ -409,7 +409,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
case ACTION_MENU_Y:
{
#if defined(__PS3__) || defined(__ORBIS__)
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__))
if(pressed && iPad == ProfileManager.GetPrimaryPad())
{
#ifdef __ORBIS__
@@ -1340,6 +1340,7 @@ int UIScene_PauseMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, i
// Check if we're signed in to LIVE
if(ProfileManager.IsSignedInLive(iPad))
{
#ifndef DISABLE_PSN
#ifdef __ORBIS__
SQRNetworkManager_Orbis::RecvInviteGUI();
#elif defined __PS3__
@@ -1347,6 +1348,7 @@ int UIScene_PauseMenu::ViewInvites_SignInReturned(void *pParam,bool bContinue, i
app.DebugPrintf("sceNpBasicRecvMessageCustom return %d ( %08x )\n", ret, ret);
#else // __PSVITA__
PSVITA_STUBBED;
#endif
#endif
}
}
@@ -110,7 +110,7 @@ void UIScene_SaveMessage::handlePress(F64 controlId, F64 childId)
m_bIgnoreInput=true;
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__))
// wait for the profile to be read - this has been kicked off earlier, so should be read by now
addTimer(PROFILE_LOADED_TIMER_ID,PROFILE_LOADED_TIMER_TIME);
#else
@@ -126,7 +126,7 @@ void UIScene_SaveMessage::handleTimerComplete(int id)
{
case PROFILE_LOADED_TIMER_ID:
{
#if !defined(DISABLE_PSN) && defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
C4JStorage::eOptionsCallback eStatus=app.GetOptionsCallbackStatus(0);
switch(eStatus)
@@ -141,13 +141,17 @@ void UIScene_SaveMessage::handleTimerComplete(int id)
// set defaults - which has already been done
killTimer(PROFILE_LOADED_TIMER_ID);
ui.NavigateToHomeMenu();
#ifndef DISABLE_PSN
SQRNetworkManager::SafeToRespondToGameBootInvite();
#endif
app.SetOptionsCallbackStatus(0,C4JStorage::eOptions_Callback_Idle);
break;
case C4JStorage::eOptions_Callback_Read_CorruptDeleted:
killTimer(PROFILE_LOADED_TIMER_ID);
ui.NavigateToHomeMenu();
#ifndef DISABLE_PSN
SQRNetworkManager::SafeToRespondToGameBootInvite();
#endif
app.SetOptionsCallbackStatus(0,C4JStorage::eOptions_Callback_Idle);
break;
case C4JStorage::eOptions_Callback_Read_Corrupt:
@@ -1518,7 +1518,8 @@ void UIScene_SkinSelectMenu::HandleDLCMountingComplete()
void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
{
// need to be signed in to live. get them to sign in to online
#if !defined(DISABLE_PSN) && defined(__PS3__)
#ifndef DISABLE_PSN
#if defined(__PS3__)
SQRNetworkManager_PS3::AttemptPSNSignIn(NULL, this);
#elif defined(__PSVITA__)
@@ -1543,6 +1544,7 @@ void UIScene_SkinSelectMenu::showNotOnlineDialog(int iPad)
UINT uiIDA[1] = { IDS_CONFIRM_OK };
ui.RequestErrorMessage(IDS_PRO_NOTONLINE_TITLE, IDS_PRO_XBOXLIVE_NOTIFICATION, uiIDA, 1, iPad );
#endif
#endif
}