feat: add PS4 networking support

This commit is contained in:
NaN committed 2026-08-03 16:53:58 -04:00
1 parent ce3e83039d
commit bf9c905848
7 files changed
+167 -35

No files matched your search

@@ -16,9 +16,11 @@ SOCKET NetworkSocketLayer::s_advertiseSock = -1;
SOCKET NetworkSocketLayer::s_discoverySock = -1; SOCKET NetworkSocketLayer::s_discoverySock = -1;
#if defined __PS3__ #if defined __PS3__
#define LCE_NET_ERRNO sys_net_errno
int closesocket(int s) { return socketclose(s); }; int closesocket(int s) { return socketclose(s); };
void terminate_networking() { cellNetCtlTerm(); sys_net_finalize_network(); }; void terminate_networking() { cellNetCtlTerm(); sys_net_finalize_network(); };
#elif defined __ORBIS__ #elif defined __ORBIS__
#define LCE_NET_ERRNO errno
int closesocket(int s) { return sceNetSocketClose(s); }; int closesocket(int s) { return sceNetSocketClose(s); };
int socketclose(int s) { return sceNetSocketClose(s); }; int socketclose(int s) { return sceNetSocketClose(s); };
void terminate_networking() {}; void terminate_networking() {};
@@ -60,10 +62,52 @@ std::vector<BYTE> NetworkSocketLayer::s_disconnectedSmallIds;
CRITICAL_SECTION NetworkSocketLayer::s_freeSmallIdLock; CRITICAL_SECTION NetworkSocketLayer::s_freeSmallIdLock;
std::vector<BYTE> NetworkSocketLayer::s_freeSmallIds; std::vector<BYTE> NetworkSocketLayer::s_freeSmallIds;
bool g_MultiplayerHost = false; bool g_Win64MultiplayerHost = false;
bool g_MultiplayerJoin = true; #if defined __ORBIS__
int g_MultiplayerPort = NETWORK_LAN_DEFAULT_PORT; // Orbis has direct lan networking so it can bypass psn account checks
char g_MultiplayerIP[256] = "127.0.0.1"; bool g_Win64MultiplayerJoin = true;
int g_Win64MultiplayerPort = WIN64_NET_DEFAULT_PORT;
char g_Win64MultiplayerIP[256] = "";
#else
bool g_Win64MultiplayerJoin = false;
int g_Win64MultiplayerPort = WIN64_NET_DEFAULT_PORT;
char g_Win64MultiplayerIP[256] = "127.0.0.1";
#endif
#ifdef _WINDOWS64
static int GetLocalIPv4Interfaces(SOCKET socketHandle, struct in_addr *localAddresses,
struct in_addr *broadcastAddresses, int capacity)
{
INTERFACE_INFO interfaceList[32];
DWORD bytesReturned = 0;
if(WSAIoctl(socketHandle, SIO_GET_INTERFACE_LIST, NULL, 0, interfaceList,
sizeof(interfaceList), &bytesReturned, NULL, NULL) == SOCKET_ERROR)
{
return 0;
}
int interfaceCount = (int)(bytesReturned / sizeof(INTERFACE_INFO));
int resultCount = 0;
for(int i = 0; i < interfaceCount && resultCount < capacity; ++i)
{
struct sockaddr_in *address = (struct sockaddr_in *)&interfaceList[i].iiAddress;
struct sockaddr_in *netmask = (struct sockaddr_in *)&interfaceList[i].iiNetmask;
if(address->sin_family != AF_INET)
continue;
unsigned long hostAddress = ntohl(address->sin_addr.s_addr);
unsigned long hostNetmask = ntohl(netmask->sin_addr.s_addr);
if(hostAddress == 0 || (hostAddress & 0xff000000) == 0x7f000000 || hostNetmask == 0)
continue;
localAddresses[resultCount] = address->sin_addr;
broadcastAddresses[resultCount].s_addr = htonl(hostAddress | ~hostNetmask);
++resultCount;
}
return resultCount;
}
#endif
bool NetworkSocketLayer::Initialize() bool NetworkSocketLayer::Initialize()
{ {
@@ -555,6 +599,9 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
struct sockaddr_in addr = {}; struct sockaddr_in addr = {};
#if defined(__ORBIS__)
addr.sin_len = sizeof(addr);
#endif
addr.sin_family = AF_INET; addr.sin_family = AF_INET;
addr.sin_port = htons((uint16_t)port); addr.sin_port = htons((uint16_t)port);
@@ -597,15 +644,16 @@ bool NetworkSocketLayer::JoinGame(const char *ip, int port)
#endif #endif
iResult = connect(s_hostConnectionSocket, (struct sockaddr*)&addr, sizeof(addr)); iResult = connect(s_hostConnectionSocket, (struct sockaddr*)&addr, sizeof(addr));
int connectError = iResult < 0 ? LCE_NET_ERRNO : 0;
if (iResult < 0) if (iResult < 0)
{ {
#if defined(__PS3__) #if defined(__PS3__)
int err = sys_net_errno; int err = connectError;
if (err == SYS_NET_EINPROGRESS) if (err == SYS_NET_EINPROGRESS)
{ {
#elif defined(__ORBIS__) #elif defined(__ORBIS__)
int err = sce_net_errno; int err = connectError;
if (err == SCE_NET_EINPROGRESS) if (err == EINPROGRESS)
{ {
#endif #endif
fd_set writeFds, exceptFds; fd_set writeFds, exceptFds;
@@ -1205,8 +1253,31 @@ int NetworkSocketLayer::AdvertiseThreadProc(LPVOID param)
data.gameHostSettings = htonl(data.gameHostSettings); data.gameHostSettings = htonl(data.gameHostSettings);
data.texturePackParentId = htonl(data.texturePackParentId); data.texturePackParentId = htonl(data.texturePackParentId);
int sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0, int sent = -1;
#ifdef _WINDOWS64
struct in_addr localAddresses[32];
struct in_addr broadcastAddresses[32];
int interfaceCount = GetLocalIPv4Interfaces(s_advertiseSock, localAddresses, broadcastAddresses, 32);
for(int i = 0; i < interfaceCount; ++i)
{
broadcastAddr.sin_addr = broadcastAddresses[i];
int interfaceSent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
if(interfaceSent != SOCKET_ERROR)
sent = interfaceSent;
}
if(interfaceCount == 0)
{
broadcastAddr.sin_addr.s_addr = INADDR_BROADCAST;
sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
}
#else
sent = sendto(s_advertiseSock, (const char *)&data, sizeof(data), 0,
(struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr)); (struct sockaddr *)&broadcastAddr, sizeof(broadcastAddr));
#endif
#if defined _WINDOWS64 || defined _XBOX #if defined _WINDOWS64 || defined _XBOX
if (sent == SOCKET_ERROR && s_advertising) if (sent == SOCKET_ERROR && s_advertising)
+41 -13
View File
@@ -7,6 +7,7 @@
#include "..\..\MinecraftServer.h" #include "..\..\MinecraftServer.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.level.h" #include "..\..\..\Minecraft.World\net.minecraft.world.level.h"
#include "..\..\..\Minecraft.World\net.minecraft.world.h" #include "..\..\..\Minecraft.World\net.minecraft.world.h"
#include "..\..\Common\Network\WinsockNetLayer.h"
#define UPDATE_PLAYERS_TIMER_ID 0 #define UPDATE_PLAYERS_TIMER_ID 0
#define UPDATE_PLAYERS_TIMER_TIME 30000 #define UPDATE_PLAYERS_TIMER_TIME 30000
@@ -50,7 +51,6 @@ void UIScene_JoinMenu::tick()
g_NetworkManager.GetFullFriendSessionInfo(m_selectedSession, &friendSessionUpdated, this); g_NetworkManager.GetFullFriendSessionInfo(m_selectedSession, &friendSessionUpdated, this);
m_friendInfoRequestIssued = true; m_friendInfoRequestIssued = true;
} }
if( m_friendInfoUpdatedOK ) if( m_friendInfoUpdatedOK )
{ {
m_friendInfoUpdatedOK = false; m_friendInfoUpdatedOK = false;
@@ -368,6 +368,12 @@ void UIScene_JoinMenu::checkPrivilegeCallback(LPVOID lpParam, bool hasPrivilege,
void UIScene_JoinMenu::StartSharedLaunchFlow() void UIScene_JoinMenu::StartSharedLaunchFlow()
{ {
const bool bManualJoin = (g_Win64MultiplayerJoin == true);
if (bManualJoin)
{
JoinGame(this);
return;
}
#if defined DISABLE_PSN #if defined DISABLE_PSN
JoinGame(this); JoinGame(this);
#else #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 // 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) void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{ {
if (pClass == NULL)
{
return;
}
const bool bManualJoin = (g_Win64MultiplayerJoin == true);
DWORD dwSignedInUsers = 0; DWORD dwSignedInUsers = 0;
bool noPrivileges = false; bool noPrivileges = false;
DWORD dwLocalUsersMask = 0; DWORD dwLocalUsersMask = 0;
@@ -428,6 +440,10 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
int iPadNotSignedInLive = -1; int iPadNotSignedInLive = -1;
ProfileManager.SetLockedProfile(0); // TEMP! ProfileManager.SetLockedProfile(0); // TEMP!
if (bManualJoin)
{
isSignedInLive = true;
}
// If we're in SD mode, then only the primary player gets to play // If we're in SD mode, then only the primary player gets to play
if (app.IsLocalMultiplayerAvailable()) if (app.IsLocalMultiplayerAvailable())
@@ -442,7 +458,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
iPadNotSignedInLive = index; iPadNotSignedInLive = index;
} }
if( !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true; if( !bManualJoin && !ProfileManager.AllowedToPlayMultiplayer(index) ) noPrivileges = true;
dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(index); dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(index);
isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(index); isSignedInLive = isSignedInLive && ProfileManager.IsSignedInLive(index);
} }
@@ -452,7 +468,7 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
{ {
if(ProfileManager.IsSignedIn(ProfileManager.GetPrimaryPad())) 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()); dwLocalUsersMask |= CGameNetworkManager::GetLocalPlayerMask(ProfileManager.GetPrimaryPad());
#ifndef DISABLE_PSN #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 this is an online game but not all players are signed in to Live, stop!
if (!isSignedInLive) if (!bManualJoin && !isSignedInLive)
{ {
#ifdef __ORBIS__ #ifdef __ORBIS__
// Check if PSN is unavailable because of age restriction // Check if PSN is unavailable because of age restriction
@@ -497,14 +513,22 @@ void UIScene_JoinMenu::JoinGame(UIScene_JoinMenu* pClass)
BOOL pccFriendsAllowed = TRUE; BOOL pccFriendsAllowed = TRUE;
#if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__PSVITA__)) #if !defined(DISABLE_PSN) && (defined(__PS3__) || defined(__PSVITA__))
if(isSignedInLive) if(!bManualJoin && isSignedInLive)
{ {
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL); ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&noUGC,NULL,NULL);
} }
#else #else
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed); if(!bManualJoin)
if(!pccAllowed && !pccFriendsAllowed) noUGC = true; {
ProfileManager.AllowedPlayerCreatedContent(ProfileManager.GetPrimaryPad(),false,&pccAllowed,&pccFriendsAllowed);
if(!pccAllowed && !pccFriendsAllowed) noUGC = true;
}
#endif #endif
if (bManualJoin)
{
noUGC = false;
noPrivileges = false;
}
#ifdef __PSVITA__ #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()); ui.RequestErrorMessage( IDS_NO_MULTIPLAYER_PRIVILEGE_TITLE, IDS_NO_MULTIPLAYER_PRIVILEGE_JOIN_TEXT, uiIDA,1,ProfileManager.GetPrimaryPad());
} }
else 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 #endif
CGameNetworkManager::eJoinGameResult result = g_NetworkManager.JoinGame( pClass->m_selectedSession, dwLocalUsersMask ); 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 ) if( result != CGameNetworkManager::JOINGAME_SUCCESS )
{ {
pClass->m_bIgnoreInput = false;
int exitReasonStringId = -1; int exitReasonStringId = -1;
switch(result) switch(result)
{ {
@@ -14,6 +14,7 @@
#include "..\..\TexturePackRepository.h" #include "..\..\TexturePackRepository.h"
#include "..\..\TexturePack.h" #include "..\..\TexturePack.h"
#include "..\Network\SessionInfo.h" #include "..\Network\SessionInfo.h"
#include "..\..\Common\Network\WinsockNetLayer.h"
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
#include "Common\Network\Sony\SonyHttp.h" #include "Common\Network\Sony\SonyHttp.h"
#include "Common\Network\Sony\SonyRemoteStorage.h" #include "Common\Network\Sony\SonyRemoteStorage.h"
@@ -1385,19 +1386,23 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
if( m_buttonListGames.getItemCount() > 0 && gameIndex < m_currentSessions->size() ) if( m_buttonListGames.getItemCount() > 0 && gameIndex < m_currentSessions->size() )
{ {
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) #if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
const bool bManualJoin = (g_Win64MultiplayerJoin == true);
// 4J-PB - is the player allowed to join games? // 4J-PB - is the player allowed to join games?
bool noUGC=false; bool noUGC=false;
bool bContentRestricted=false; bool bContentRestricted=false;
// we're online, since we are joining a game // A direct LAN join should probnot use PSN matchmaking or account privileges (nansess)
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&noUGC,&bContentRestricted,NULL); if(!bManualJoin)
{
ProfileManager.GetChatAndContentRestrictions(m_iPad,true,&noUGC,&bContentRestricted,NULL);
}
#ifdef __ORBIS__ #ifdef __ORBIS__
// 4J Stu - On PS4 we don't restrict playing multiplayer based on chat restriction, so remove this check // 4J Stu - On PS4 we don't restrict playing multiplayer based on chat restriction, so remove this check
noUGC = false; noUGC = false;
bool bPlayStationPlus=true; bool bPlayStationPlus=true;
int iPadWithNoPlaystationPlus=0; int iPadWithNoPlaystationPlus=-1;
bool isSignedInLive = true; bool isSignedInLive = true;
int iPadNotSignedInLive = -1; int iPadNotSignedInLive = -1;
for(unsigned int i = 0; i < XUSER_MAX_COUNT; ++i) 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) if(ProfileManager.HasPlayStationPlus(i)==false)
{ {
bPlayStationPlus=false; bPlayStationPlus=false;
iPadWithNoPlaystationPlus = (int)i;
break; break;
} }
} }
@@ -1427,7 +1433,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
} }
#endif #endif
if(noUGC) if(!bManualJoin && noUGC)
{ {
// not allowed to join // not allowed to join
#ifndef __PSVITA__ #ifndef __PSVITA__
@@ -1443,7 +1449,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
m_bIgnoreInput=false; m_bIgnoreInput=false;
return; return;
} }
else if(bContentRestricted) else if(!bManualJoin && bContentRestricted)
{ {
ui.RequestContentRestrictedMessageBox(); ui.RequestContentRestrictedMessageBox();
@@ -1452,7 +1458,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
} }
#ifdef __ORBIS__ #ifdef __ORBIS__
// If this is an online game but not all players are signed in to Live, stop! // 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]; UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK; uiIDA[0]=IDS_CONFIRM_OK;
@@ -1471,7 +1477,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
} }
return; return;
} }
else if(bPlayStationPlus==false) else if(!bManualJoin && bPlayStationPlus==false)
{ {
if(ProfileManager.RequestingPlaystationPlus(iPadWithNoPlaystationPlus)) if(ProfileManager.RequestingPlaystationPlus(iPadWithNoPlaystationPlus))
@@ -1480,6 +1486,7 @@ void UIScene_LoadOrJoinMenu::CheckAndJoinGame(int gameIndex)
UINT uiIDA[1]; UINT uiIDA[1];
uiIDA[0]=IDS_OK; uiIDA[0]=IDS_OK;
ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL); ui.RequestAlertMessage(IDS_ERROR_NETWORK_TITLE, IDS_ERROR_NETWORK, uiIDA, 1, ProfileManager.GetPrimaryPad(), NULL, NULL);
m_bIgnoreInput=false;
return; return;
} }
@@ -8,6 +8,7 @@
#include "UIScene_MainMenu.h" #include "UIScene_MainMenu.h"
#ifdef __ORBIS__ #ifdef __ORBIS__
#include <error_dialog.h> #include <error_dialog.h>
#include "..\..\Common\Network\WinsockNetLayer.h"
#endif #endif
Random *UIScene_MainMenu::random = new Random(); Random *UIScene_MainMenu::random = new Random();
@@ -318,7 +319,20 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
//CD - Added for audio //CD - Added for audio
ui.PlayUISFX(eSFX_Press); ui.PlayUISFX(eSFX_Press);
ProfileManager.RefreshChatAndContentRestrictions(RefreshChatAndContentRestrictionsReturned_PlayGame, this); if(g_Win64MultiplayerJoin)
{
// The LAN backend does not use PSN privileges. Do this before
// starting the asynchronous restriction refresh: while offline that
// 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 #else
m_eAction=eAction_RunGame; m_eAction=eAction_RunGame;
@@ -1098,6 +1112,12 @@ void UIScene_MainMenu::RefreshChatAndContentRestrictionsReturned_PlayGame(void *
int primaryPad = ProfileManager.GetPrimaryPad(); int primaryPad = ProfileManager.GetPrimaryPad();
UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam; UIScene_MainMenu* pClass = (UIScene_MainMenu*)pParam;
const bool bManualJoin = (g_Win64MultiplayerJoin == true);
if (bManualJoin)
{
CreateLoad_SignInReturned(pClass, true, primaryPad);
return;
}
int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL; int (*signInReturnedFunc) (LPVOID,const bool, const int iPad) = NULL;
+2 -1
View File
@@ -1015,7 +1015,8 @@ xcopy /q /y /i /s /e $(ProjectDir)DurangoMedia\CU $(LayoutDir)Image\Loose\CU</C
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_FINAL_BUILD;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <!-- windows host packet layout compatible with the PS4 to avoid ps4 crashin due to invaild packet -->
<PreprocessorDefinitions>_LARGE_WORLDS;_EXTENDED_ACHIEVEMENTS;_FINAL_BUILD;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling> <CallAttributedProfiling>Disabled</CallAttributedProfiling>
<AdditionalIncludeDirectories>Windows64\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>Windows64\Iggy\include;$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
@@ -619,7 +619,6 @@ DWORD GetFileAttributesA(LPCSTR lpFileName)
SceFiosStat statData; SceFiosStat statData;
if(sceFiosStatSync(NULL, filePath, &statData) != SCE_FIOS_OK) if(sceFiosStatSync(NULL, filePath, &statData) != SCE_FIOS_OK)
{ {
app.DebugPrintf("*** sceFiosStatSync Failed\n");
return -1; return -1;
} }
if(statData.statFlags & SCE_FIOS_STATUS_DIRECTORY ) if(statData.statFlags & SCE_FIOS_STATUS_DIRECTORY )
@@ -673,17 +672,23 @@ BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
VOID OutputDebugStringW(LPCWSTR lpOutputString) VOID OutputDebugStringW(LPCWSTR lpOutputString)
{ {
wprintf(lpOutputString); if (lpOutputString != NULL)
wprintf(L"%ls", lpOutputString);
fflush(stdout);
} }
VOID OutputDebugStringA(LPCSTR lpOutputString) VOID OutputDebugStringA(LPCSTR lpOutputString)
{ {
printf(lpOutputString); if (lpOutputString != NULL)
printf("%s", lpOutputString);
fflush(stdout);
} }
VOID OutputDebugString(LPCSTR lpOutputString) VOID OutputDebugString(LPCSTR lpOutputString)
{ {
printf(lpOutputString); if (lpOutputString != NULL)
printf("%s", lpOutputString);
fflush(stdout);
} }
#endif // _CONTENT_PACKAGE #endif // _CONTENT_PACKAGE
+1 -1
View File
@@ -858,7 +858,7 @@
<BufferSecurityCheck>false</BufferSecurityCheck> <BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile> <PrecompiledHeaderOutputFile>$(OutDir)$(ProjectName).pch</PrecompiledHeaderOutputFile>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PreprocessorDefinitions>_FINAL_BUILD;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>_LARGE_WORLDS;_EXTENDED_ACHIEVEMENTS;_FINAL_BUILD;_LIB;_CRT_NON_CONFORMING_SWPRINTFS;_CRT_SECURE_NO_WARNINGS;_WINDOWS64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<CallAttributedProfiling>Disabled</CallAttributedProfiling> <CallAttributedProfiling>Disabled</CallAttributedProfiling>
<RuntimeTypeInfo>true</RuntimeTypeInfo> <RuntimeTypeInfo>true</RuntimeTypeInfo>
<ShowIncludes>false</ShowIncludes> <ShowIncludes>false</ShowIncludes>