Revert "Project modernization (#630)"

This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -309,7 +309,7 @@ void hexStrToBin(
val <<= 4;
}
else {
if (pBinBuf != nullptr && binOffset < binBufSize) {
if (pBinBuf != NULL && binOffset < binBufSize) {
memcpy(pBinBuf + binOffset, &val, 1);
val = 0;
}
@@ -317,7 +317,7 @@ void hexStrToBin(
}
}
if (val != 0 && pBinBuf != nullptr && binOffset < binBufSize) {
if (val != 0 && pBinBuf != NULL && binOffset < binBufSize) {
memcpy(pBinBuf + binOffset, &val, 1);
}

View File

@@ -17,8 +17,8 @@
// #include "..\PS3Extras\PS3Strings.h"
int (* SQRNetworkManager_Orbis::s_SignInCompleteCallbackFn)(void *pParam, bool bContinue, int pad) = nullptr;
void * SQRNetworkManager_Orbis::s_SignInCompleteParam = nullptr;
int (* SQRNetworkManager_Orbis::s_SignInCompleteCallbackFn)(void *pParam, bool bContinue, int pad) = NULL;
void * SQRNetworkManager_Orbis::s_SignInCompleteParam = NULL;
sce::Toolkit::NP::PresenceDetails SQRNetworkManager_Orbis::s_lastPresenceInfo;
int64_t SQRNetworkManager_Orbis::s_lastPresenceTime = 0;
@@ -109,8 +109,8 @@ SQRNetworkManager_Orbis::SQRNetworkManager_Orbis(ISQRNetworkManagerListener *lis
m_isInSession = false;
m_offlineGame = false;
m_offlineSQR = false;
m_aServerId = nullptr;
m_gameBootInvite = nullptr;
m_aServerId = NULL;
m_gameBootInvite = NULL;
m_onlineStatus = false;
m_bLinkDisconnected = false;
m_bRefreshingRestrictionsForInvite = false;
@@ -137,7 +137,7 @@ void SQRNetworkManager_Orbis::Initialise()
int32_t ret = 0;
int32_t libCtxId = 0;
ret = sceNpInGameMessageInitialize(NP_IN_GAME_MESSAGE_POOL_SIZE, nullptr);
ret = sceNpInGameMessageInitialize(NP_IN_GAME_MESSAGE_POOL_SIZE, NULL);
assert (ret >= 0);
libCtxId = ret;
@@ -251,7 +251,7 @@ void SQRNetworkManager_Orbis::InitialiseAfterOnline()
if( s_SignInCompleteCallbackFn )
{
s_SignInCompleteCallbackFn(s_SignInCompleteParam,true,s_SignInCompleteCallbackPad);
s_SignInCompleteCallbackFn = nullptr;
s_SignInCompleteCallbackFn = NULL;
s_SignInCompleteCallbackPad = -1;
}
return;
@@ -334,7 +334,7 @@ void SQRNetworkManager_Orbis::RefreshChatAndContentRestrictionsReturned_HandleIn
SQRNetworkManager_Orbis *netMan = (SQRNetworkManager_Orbis *)pParam;
netMan->m_listener->HandleInviteReceived( ProfileManager.GetPrimaryPad(), netMan->m_gameBootInvite );
netMan->m_gameBootInvite = nullptr;
netMan->m_gameBootInvite = NULL;
netMan->m_bRefreshingRestrictionsForInvite = false;
}
@@ -357,7 +357,7 @@ void SQRNetworkManager_Orbis::Tick()
m_bRefreshingRestrictionsForInvite = true;
ProfileManager.RefreshChatAndContentRestrictions(RefreshChatAndContentRestrictionsReturned_HandleInvite, this);
//m_listener->HandleInviteReceived( ProfileManager.GetPrimaryPad(), m_gameBootInvite );
//m_gameBootInvite = nullptr;
//m_gameBootInvite = NULL;
}
ErrorHandlingTick();
@@ -431,14 +431,14 @@ void SQRNetworkManager_Orbis::Tick()
if(s_SignInCompleteCallbackFn)
{
s_SignInCompleteCallbackFn(s_SignInCompleteParam,false,s_SignInCompleteCallbackPad);
s_SignInCompleteCallbackFn = nullptr;
s_SignInCompleteCallbackFn = NULL;
}
s_SignInCompleteCallbackPad = -1;
}
else if(s_SignInCompleteCallbackFn)
{
s_SignInCompleteCallbackFn(s_SignInCompleteParam, true, s_SignInCompleteCallbackPad);
s_SignInCompleteCallbackFn = nullptr;
s_SignInCompleteCallbackFn = NULL;
s_SignInCompleteCallbackPad = -1;
}
}
@@ -539,7 +539,7 @@ void SQRNetworkManager_Orbis::ErrorHandlingTick()
m_bCallPSNSignInCallback=true;
//s_SignInCompleteCallbackFn(s_SignInCompleteParam,false,s_SignInCompleteCallbackPad);
}
//s_SignInCompleteCallbackFn = nullptr;
//s_SignInCompleteCallbackFn = NULL;
//s_SignInCompleteCallbackPad = -1;
}
app.DebugPrintf("Network error: SNM_INT_STATE_INITIALISE_FAILED\n");
@@ -655,7 +655,7 @@ void SQRNetworkManager_Orbis::UpdateExternalRoomData()
reqParam.roomBinAttrExternalNum = 1;
reqParam.roomBinAttrExternal = &roomBinAttr;
int ret = sceNpMatching2SetRoomDataExternal ( m_matchingContext, &reqParam, nullptr, &m_setRoomDataRequestId );
int ret = sceNpMatching2SetRoomDataExternal ( m_matchingContext, &reqParam, NULL, &m_setRoomDataRequestId );
app.DebugPrintf(CMinecraftApp::USER_RR,"sceNpMatching2SetRoomDataExternal returns 0x%x, number of players %d\n",ret,((char *)m_joinExtData)[174]);
if( ( ret < 0 ) || ForceErrorPoint( SNM_FORCE_ERROR_SET_EXTERNAL_ROOM_DATA ) )
{
@@ -685,11 +685,11 @@ bool SQRNetworkManager_Orbis::FriendRoomManagerSearch()
}
// Free up any external data that we received from the previous search
for( size_t i = 0; i < m_aFriendSearchResults.size(); i++ )
for( int i = 0; i < m_aFriendSearchResults.size(); i++ )
{
if(m_aFriendSearchResults[i].m_RoomExtDataReceived)
free(m_aFriendSearchResults[i].m_RoomExtDataReceived);
m_aFriendSearchResults[i].m_RoomExtDataReceived = nullptr;
m_aFriendSearchResults[i].m_RoomExtDataReceived = NULL;
}
m_friendSearchState = SNM_FRIEND_SEARCH_STATE_GETTING_FRIEND_COUNT;
@@ -755,7 +755,7 @@ void SQRNetworkManager_Orbis::FriendSearchTick()
{
m_friendSearchState = SNM_FRIEND_SEARCH_STATE_GETTING_FRIEND_INFO;
delete m_getFriendCountThread;
m_getFriendCountThread = nullptr;
m_getFriendCountThread = NULL;
FriendRoomManagerSearch2();
}
}
@@ -773,7 +773,7 @@ int SQRNetworkManager_Orbis::BasicEventThreadProc( void *lpParameter )
do
{
ret = sceKernelWaitEqueue(manager->m_basicEventQueue, &event, 1, &outEv, nullptr);
ret = sceKernelWaitEqueue(manager->m_basicEventQueue, &event, 1, &outEv, NULL);
// If the sys_event_t we've sent here from the handler has a non-zero data1 element, this is to signify that we should terminate the thread
if( event.udata == 0 )
@@ -979,7 +979,7 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerByIndex(int idx)
}
else
{
return nullptr;
return NULL;
}
}
@@ -996,7 +996,7 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerBySmallId(int idx)
}
}
LeaveCriticalSection(&m_csRoomSyncData);
return nullptr;
return NULL;
}
SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerByXuid(PlayerUID xuid)
@@ -1012,7 +1012,7 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerByXuid(PlayerUID xuid)
}
}
LeaveCriticalSection(&m_csRoomSyncData);
return nullptr;
return NULL;
}
SQRNetworkPlayer *SQRNetworkManager_Orbis::GetLocalPlayerByUserIndex(int idx)
@@ -1028,7 +1028,7 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetLocalPlayerByUserIndex(int idx)
}
}
LeaveCriticalSection(&m_csRoomSyncData);
return nullptr;
return NULL;
}
SQRNetworkPlayer *SQRNetworkManager_Orbis::GetHostPlayer()
@@ -1041,11 +1041,11 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetHostPlayer()
SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerIfReady(SQRNetworkPlayer *player)
{
if( player == nullptr ) return nullptr;
if( player == NULL ) return NULL;
if( player->IsReady() ) return player;
return nullptr;
return NULL;
}
// Update state internally
@@ -1099,7 +1099,7 @@ bool SQRNetworkManager_Orbis::JoinRoom(SQRNetworkManager_Orbis::SessionSearchRes
{
// Set up the presence info we would like to synchronise out when we have fully joined the game
CPlatformNetworkManagerSony::SetSQRPresenceInfoFromExtData(&s_lastPresenceSyncInfo, searchResult->m_extData, searchResult->m_sessionId.m_RoomId, searchResult->m_sessionId.m_ServerId);
return JoinRoom(searchResult->m_sessionId.m_RoomId, searchResult->m_sessionId.m_ServerId, localPlayerMask, nullptr);
return JoinRoom(searchResult->m_sessionId.m_RoomId, searchResult->m_sessionId.m_ServerId, localPlayerMask, NULL);
}
// Join room with a specified roomId. This is used when joining from an invite, as well as by the previous method
@@ -1165,7 +1165,7 @@ void SQRNetworkManager_Orbis::LeaveRoom(bool bActuallyLeaveRoom)
reqParam.roomId = m_room;
SetState(SNM_INT_STATE_LEAVING);
int ret = sceNpMatching2LeaveRoom( m_matchingContext, &reqParam, nullptr, &m_leaveRoomRequestId );
int ret = sceNpMatching2LeaveRoom( m_matchingContext, &reqParam, NULL, &m_leaveRoomRequestId );
if( ( ret < 0 ) || ForceErrorPoint(SNM_FORCE_ERROR_LEAVE_ROOM) )
{
SetState(SNM_INT_STATE_LEAVING_FAILED);
@@ -1274,7 +1274,7 @@ bool SQRNetworkManager_Orbis::AddLocalPlayerByUserIndex(int idx)
reqParam.roomMemberBinAttrInternalNum = 1;
reqParam.roomMemberBinAttrInternal = &binAttr;
int ret = sceNpMatching2SetRoomMemberDataInternal( m_matchingContext, &reqParam, nullptr, &m_setRoomMemberInternalDataRequestId );
int ret = sceNpMatching2SetRoomMemberDataInternal( m_matchingContext, &reqParam, NULL, &m_setRoomMemberInternalDataRequestId );
if( ( ret < 0 ) || ForceErrorPoint(SNM_FORCE_ERROR_SET_ROOM_MEMBER_DATA_INTERNAL) )
{
@@ -1326,7 +1326,7 @@ bool SQRNetworkManager_Orbis::RemoveLocalPlayerByUserIndex(int idx)
// And do any adjusting necessary to the mappings from this room data, to the SQRNetworkPlayers.
// This will also delete the SQRNetworkPlayer and do all the callbacks that requires etc.
MapRoomSlotPlayers(roomSlotPlayerCount);
m_aRoomSlotPlayers[m_roomSyncData.getPlayerCount()] = nullptr;
m_aRoomSlotPlayers[m_roomSyncData.getPlayerCount()] = NULL;
// Sync this back out to our networked clients...
SyncRoomData();
@@ -1367,7 +1367,7 @@ bool SQRNetworkManager_Orbis::RemoveLocalPlayerByUserIndex(int idx)
reqParam.roomMemberBinAttrInternalNum = 1;
reqParam.roomMemberBinAttrInternal = &binAttr;
int ret = sceNpMatching2SetRoomMemberDataInternal( m_matchingContext, &reqParam, nullptr, &m_setRoomMemberInternalDataRequestId );
int ret = sceNpMatching2SetRoomMemberDataInternal( m_matchingContext, &reqParam, NULL, &m_setRoomMemberInternalDataRequestId );
if( ( ret < 0 ) || ForceErrorPoint(SNM_FORCE_ERROR_SET_ROOM_MEMBER_DATA_INTERNAL2) )
{
@@ -1388,7 +1388,7 @@ void SQRNetworkManager_Orbis::UpdateRemotePlay()
int localPlayerCount = 0;
for(int i = 0; i < XUSER_MAX_COUNT; i++)
{
if(GetLocalPlayerByUserIndex(i) != nullptr) localPlayerCount++;
if(GetLocalPlayerByUserIndex(i) != NULL) localPlayerCount++;
}
InputManager.SetLocalMultiplayer(localPlayerCount > 1);
}
@@ -1427,7 +1427,7 @@ void SQRNetworkManager_Orbis::SendInviteGUI()
messData.body.assign(body);
messData.dialogFlag = SCE_TOOLKIT_NP_DIALOG_TYPE_USER_EDITABLE;
messData.npIdsCount = 2; // TODO: Set this to the number of available slots
messData.npIds = nullptr;
messData.npIds = NULL;
messData.userInfo.userId = userId;
// Set expire to maximum
@@ -1602,7 +1602,7 @@ void SQRNetworkManager_Orbis::FindOrCreateNonNetworkPlayer(int slot, int playerT
}
}
// Create the player - non-network players can be considered complete as soon as we create them as we aren't waiting on their network connections becoming complete, so can flag them as such and notify via callback
PlayerUID *pUID = nullptr;
PlayerUID *pUID = NULL;
PlayerUID localUID;
if( ( playerType == SQRNetworkPlayer::SNP_TYPE_LOCAL ) ||
(m_isHosting && ( playerType == SQRNetworkPlayer::SNP_TYPE_HOST )) )
@@ -1669,7 +1669,7 @@ void SQRNetworkManager_Orbis::MapRoomSlotPlayers(int roomSlotPlayerCount/*=-1*/)
if( m_aRoomSlotPlayers[i]->m_type != SQRNetworkPlayer::SNP_TYPE_REMOTE )
{
m_vecTempPlayers.push_back(m_aRoomSlotPlayers[i]);
m_aRoomSlotPlayers[i] = nullptr;
m_aRoomSlotPlayers[i] = NULL;
}
}
}
@@ -1725,7 +1725,7 @@ void SQRNetworkManager_Orbis::MapRoomSlotPlayers(int roomSlotPlayerCount/*=-1*/)
if( m_aRoomSlotPlayers[i]->m_type != SQRNetworkPlayer::SNP_TYPE_LOCAL )
{
m_vecTempPlayers.push_back(m_aRoomSlotPlayers[i]);
m_aRoomSlotPlayers[i] = nullptr;
m_aRoomSlotPlayers[i] = NULL;
}
}
}
@@ -1817,7 +1817,7 @@ void SQRNetworkManager_Orbis::UpdatePlayersFromRoomSyncUIDs()
}
// Host only - add remote players to our internal storage of player slots, and synchronise this with other room members.
bool SQRNetworkManager_Orbis::AddRemotePlayersAndSync( SceNpMatching2RoomMemberId memberId, int playerMask, bool *isFull/*==nullptr*/ )
bool SQRNetworkManager_Orbis::AddRemotePlayersAndSync( SceNpMatching2RoomMemberId memberId, int playerMask, bool *isFull/*==NULL*/ )
{
assert( m_isHosting );
@@ -1939,7 +1939,7 @@ void SQRNetworkManager_Orbis::RemoveRemotePlayersAndSync( SceNpMatching2RoomMemb
}
// Zero last element, that isn't part of the currently sized array anymore
memset(&m_roomSyncData.players[m_roomSyncData.getPlayerCount()],0,sizeof(PlayerSyncData));
m_aRoomSlotPlayers[m_roomSyncData.getPlayerCount()] = nullptr;
m_aRoomSlotPlayers[m_roomSyncData.getPlayerCount()] = NULL;
}
else
{
@@ -1984,7 +1984,7 @@ void SQRNetworkManager_Orbis::RemoveNetworkPlayers( int mask )
{
if( m_aRoomSlotPlayers[i] == player )
{
m_aRoomSlotPlayers[i] = nullptr;
m_aRoomSlotPlayers[i] = NULL;
}
}
// And delete the reference from the ctx->player map
@@ -2037,7 +2037,7 @@ void SQRNetworkManager_Orbis::SyncRoomData()
roomBinAttr.size = sizeof( m_roomSyncData );
reqParam.roomBinAttrInternalNum = 1;
reqParam.roomBinAttrInternal = &roomBinAttr;
sceNpMatching2SetRoomDataInternal ( m_matchingContext, &reqParam, nullptr, &m_setRoomDataRequestId );
sceNpMatching2SetRoomDataInternal ( m_matchingContext, &reqParam, NULL, &m_setRoomDataRequestId );
}
// Check if the matching context is valid, and if not attempt to create one. If to do this requires starting an asynchronous process, then sets the internal state to the state passed in
@@ -2159,7 +2159,7 @@ bool SQRNetworkManager_Orbis::GetServerContext(SceNpMatching2ServerId serverId)
// {
// // Get list of server IDs of servers allocated to the application. We don't actually need to do this, but it is as good a way as any to try a matching2 service and check that
// // the context *really* is valid.
// int serverCount = sceNpMatching2GetServerIdListLocal( m_matchingContext, nullptr, 0 );
// int serverCount = sceNpMatching2GetServerIdListLocal( m_matchingContext, NULL, 0 );
// // If an error is returned here, we need to destroy and recerate our server - if this goes ok we should come back through this path again
// if( ( serverCount == SCE_NP_MATCHING2_ERROR_CONTEXT_UNAVAILABLE ) || // This error has been seen (occasionally) in a normal working environment
// ( serverCount == SCE_NP_MATCHING2_ERROR_CONTEXT_NOT_STARTED ) ) // Also checking for this as a means of simulating the previous error
@@ -2253,7 +2253,7 @@ void SQRNetworkManager_Orbis::RoomCreateTick()
SetState(SNM_INT_STATE_HOSTING_CREATE_ROOM_CREATING_ROOM);
app.DebugPrintf(CMinecraftApp::USER_RR,">> Creating room start\n");
s_roomStartTime = System::currentTimeMillis();
int ret = sceNpMatching2CreateJoinRoom( m_matchingContext, &reqParam, nullptr, &m_createRoomRequestId );
int ret = sceNpMatching2CreateJoinRoom( m_matchingContext, &reqParam, NULL, &m_createRoomRequestId );
if ( ( ret < 0 ) || ForceErrorPoint(SNM_FORCE_ERROR_CREATE_JOIN_ROOM) )
{
SetState(SNM_INT_STATE_HOSTING_CREATE_ROOM_FAILED);
@@ -2493,7 +2493,7 @@ bool SQRNetworkManager_Orbis::CreateVoiceRudpConnections(SceNpMatching2RoomId ro
// create this connection if we don't have it already
SQRVoiceConnection* pConnection = SonyVoiceChat_Orbis::getVoiceConnectionFromRoomMemberID(peerMemberId);
if(pConnection == nullptr)
if(pConnection == NULL)
{
// Create an Rudp context for the voice connection, this will happen regardless of whether the peer is client or host
@@ -2573,7 +2573,7 @@ bool SQRNetworkManager_Orbis::CreateRudpConnections(SceNpMatching2RoomId roomId,
if( m_isHosting )
{
m_RudpCtxToPlayerMap[ rudpCtx ] = new SQRNetworkPlayer( this, SQRNetworkPlayer::SNP_TYPE_REMOTE, true, playersMemberId, i, rudpCtx, nullptr );
m_RudpCtxToPlayerMap[ rudpCtx ] = new SQRNetworkPlayer( this, SQRNetworkPlayer::SNP_TYPE_REMOTE, true, playersMemberId, i, rudpCtx, NULL );
}
else
{
@@ -2611,7 +2611,7 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerFromRudpCtx(int rudpCtx)
{
return it->second;
}
return nullptr;
return NULL;
}
@@ -2625,7 +2625,7 @@ SQRNetworkPlayer *SQRNetworkManager_Orbis::GetPlayerFromRoomMemberAndLocalIdx(in
return it->second;
}
}
return nullptr;
return NULL;
}
@@ -2720,7 +2720,7 @@ void SQRNetworkManager_Orbis::ContextCallback(SceNpMatching2ContextId id, SceNp
if( manager->m_state == SNM_INT_STATE_IDLE_RECREATING_MATCHING_CONTEXT )
{
manager->SetState( SNM_INT_STATE_IDLE );
manager->GetExtDataForRoom(0, nullptr, nullptr, nullptr);
manager->GetExtDataForRoom(0, NULL, NULL, NULL);
break;
}
@@ -2759,7 +2759,7 @@ void SQRNetworkManager_Orbis::ContextCallback(SceNpMatching2ContextId id, SceNp
// if(s_SignInCompleteCallbackFn)
// {
// s_SignInCompleteCallbackFn(s_SignInCompleteParam, true, 0);
// s_SignInCompleteCallbackFn = nullptr;
// s_SignInCompleteCallbackFn = NULL;
// }
@@ -2966,12 +2966,12 @@ void SQRNetworkManager_Orbis::DefaultRequestCallback(SceNpMatching2ContextId id,
// Set flag to indicate whether we were kicked for being out of room or not
reqParam.optData.data[0] = isFull ? 1 : 0;
reqParam.optData.len = 1;
int ret = sceNpMatching2KickoutRoomMember(manager->m_matchingContext, &reqParam, nullptr, &manager->m_kickRequestId);
int ret = sceNpMatching2KickoutRoomMember(manager->m_matchingContext, &reqParam, NULL, &manager->m_kickRequestId);
app.DebugPrintf(CMinecraftApp::USER_RR,"sceNpMatching2KickoutRoomMember returns error 0x%x\n",ret);
}
else
{
if(pRoomMemberData->roomMemberDataInternal->roomMemberBinAttrInternal->data.ptr == nullptr)
if(pRoomMemberData->roomMemberDataInternal->roomMemberBinAttrInternal->data.ptr == NULL)
{
// the host doesn't send out data, so this must be the host we're connecting to
@@ -3213,7 +3213,7 @@ void SQRNetworkManager_Orbis::RoomEventCallback(SceNpMatching2ContextId id, SceN
reqParam.roomMemberBinAttrInternalNum = 1;
reqParam.roomMemberBinAttrInternal = &binAttr;
int ret = sceNpMatching2SetRoomMemberDataInternal( manager->m_matchingContext, &reqParam, nullptr, &manager->m_setRoomMemberInternalDataRequestId );
int ret = sceNpMatching2SetRoomMemberDataInternal( manager->m_matchingContext, &reqParam, NULL, &manager->m_setRoomMemberInternalDataRequestId );
}
else
{
@@ -3349,7 +3349,7 @@ void SQRNetworkManager_Orbis::ProcessSignallingEvent(SceNpMatching2ContextId ctx
reqParam.attrId = attrs;
reqParam.attrIdNum = 1;
sceNpMatching2GetRoomMemberDataInternal( m_matchingContext, &reqParam, nullptr, &m_roomMemberDataRequestId);
sceNpMatching2GetRoomMemberDataInternal( m_matchingContext, &reqParam, NULL, &m_roomMemberDataRequestId);
}
break;
}
@@ -3358,7 +3358,7 @@ void SQRNetworkManager_Orbis::ProcessSignallingEvent(SceNpMatching2ContextId ctx
void SQRNetworkManager_Orbis::SignallingEventsTick()
{
EnterCriticalSection(&m_signallingEventListCS);
for(size_t i=0;i<m_signallingEventList.size(); i++)
for(int i=0;i<m_signallingEventList.size(); i++)
{
SignallingEvent& ev = m_signallingEventList[i];
ProcessSignallingEvent(ev.ctxId, ev.roomId, ev.peerMemberId, ev.event, ev.error_code);
@@ -3376,7 +3376,7 @@ int SQRNetworkManager_Orbis::BasicEventCallback(int event, int retCode, uint32_t
ORBIS_STUBBED;
// SQRNetworkManager_Orbis *manager = (SQRNetworkManager_Orbis *)arg;
// // We aren't allowed to actually get the event directly from this callback, so send our own internal event to a thread dedicated to doing this
// sceKernelTriggerUserEvent(m_basicEventQueue, sc_UserEventHandle, nullptr);
// sceKernelTriggerUserEvent(m_basicEventQueue, sc_UserEventHandle, NULL);
return 0;
}
@@ -3422,7 +3422,7 @@ void SQRNetworkManager_Orbis::SysUtilCallback(uint64_t status, uint64_t param, v
// {
// s_SignInCompleteCallbackFn(s_SignInCompleteParam,false,0);
// }
// s_SignInCompleteCallbackFn = nullptr;
// s_SignInCompleteCallbackFn = NULL;
// }
// return;
// }
@@ -3437,7 +3437,7 @@ void SQRNetworkManager_Orbis::SysUtilCallback(uint64_t status, uint64_t param, v
// {
// s_SignInCompleteCallbackFn(s_SignInCompleteParam,false,0);
// }
// s_SignInCompleteCallbackFn = nullptr;
// s_SignInCompleteCallbackFn = NULL;
// }
// }
//
@@ -3534,7 +3534,7 @@ void SQRNetworkManager_Orbis::RudpContextCallback(int ctx_id, int event_id, int
if( dataSize >= sizeof(SQRNetworkPlayer::InitSendData) )
{
SQRNetworkPlayer::InitSendData ISD;
int bytesRead = sceRudpRead( ctx_id, &ISD, sizeof(SQRNetworkPlayer::InitSendData), 0, nullptr );
int bytesRead = sceRudpRead( ctx_id, &ISD, sizeof(SQRNetworkPlayer::InitSendData), 0, NULL );
if( bytesRead == sizeof(SQRNetworkPlayer::InitSendData) )
{
manager->NetworkPlayerInitialDataReceived(playerFrom, &ISD);
@@ -3555,7 +3555,7 @@ void SQRNetworkManager_Orbis::RudpContextCallback(int ctx_id, int event_id, int
if( dataSize > 0 )
{
unsigned char *data = new unsigned char [ dataSize ];
int bytesRead = sceRudpRead( ctx_id, data, dataSize, 0, nullptr );
int bytesRead = sceRudpRead( ctx_id, data, dataSize, 0, NULL );
if( bytesRead > 0 )
{
SQRNetworkPlayer *playerFrom, *playerTo;
@@ -3571,7 +3571,7 @@ void SQRNetworkManager_Orbis::RudpContextCallback(int ctx_id, int event_id, int
playerFrom = manager->m_aRoomSlotPlayers[0];
playerTo = manager->GetPlayerFromRudpCtx( ctx_id );
}
if( ( playerFrom != nullptr ) && ( playerTo != nullptr ) )
if( ( playerFrom != NULL ) && ( playerTo != NULL ) )
{
manager->m_listener->HandleDataReceived( playerFrom, playerTo, data, bytesRead );
}
@@ -3632,7 +3632,7 @@ void SQRNetworkManager_Orbis::ServerContextValid_CreateRoom()
int ret = -1;
if( !ForceErrorPoint(SNM_FORCE_ERROR_GET_WORLD_INFO_LIST) )
{
ret = sceNpMatching2GetWorldInfoList( m_matchingContext, &reqParam, nullptr, &m_getWorldRequestId);
ret = sceNpMatching2GetWorldInfoList( m_matchingContext, &reqParam, NULL, &m_getWorldRequestId);
}
if (ret < 0)
{
@@ -3661,7 +3661,7 @@ void SQRNetworkManager_Orbis::ServerContextValid_JoinRoom()
reqParam.roomMemberBinAttrInternalNum = 1;
reqParam.roomMemberBinAttrInternal = &binAttr;
int ret = sceNpMatching2JoinRoom( m_matchingContext, &reqParam, nullptr, &m_joinRoomRequestId );
int ret = sceNpMatching2JoinRoom( m_matchingContext, &reqParam, NULL, &m_joinRoomRequestId );
if ( (ret < 0) || ForceErrorPoint(SNM_FORCE_ERROR_JOIN_ROOM) )
{
if( ret == SCE_NP_MATCHING2_SERVER_ERROR_NAT_TYPE_MISMATCH)
@@ -3722,9 +3722,9 @@ void SQRNetworkManager_Orbis::GetExtDataForRoom( SceNpMatching2RoomId roomId, vo
static SceNpMatching2RoomId aRoomId[1];
static SceNpMatching2AttributeId attr[1];
// All parameters will be nullptr if this is being called a second time, after creating a new matching context via one of the paths below (using GetMatchingContext).
// nullptr parameters therefore basically represents an attempt to retry the last sceNpMatching2GetRoomDataExternalList
if( extData != nullptr )
// All parameters will be NULL if this is being called a second time, after creating a new matching context via one of the paths below (using GetMatchingContext).
// NULL parameters therefore basically represents an attempt to retry the last sceNpMatching2GetRoomDataExternalList
if( extData != NULL )
{
aRoomId[0] = roomId;
attr[0] = SCE_NP_MATCHING2_ROOM_BIN_ATTR_EXTERNAL_1_ID;
@@ -3748,14 +3748,14 @@ void SQRNetworkManager_Orbis::GetExtDataForRoom( SceNpMatching2RoomId roomId, vo
return;
}
// Kicked off an asynchronous thing that will create a matching context, and then call this method back again (with nullptr params) once done, so we can reattempt. Don't do anything more now.
// Kicked off an asynchronous thing that will create a matching context, and then call this method back again (with NULL params) once done, so we can reattempt. Don't do anything more now.
if( m_state == SNM_INT_STATE_IDLE_RECREATING_MATCHING_CONTEXT )
{
app.DebugPrintf("Having to recreate matching context, setting state to SNM_INT_STATE_IDLE_RECREATING_MATCHING_CONTEXT\n");
return;
}
int ret = sceNpMatching2GetRoomDataExternalList( m_matchingContext, &reqParam, nullptr, &m_roomDataExternalListRequestId );
int ret = sceNpMatching2GetRoomDataExternalList( m_matchingContext, &reqParam, NULL, &m_roomDataExternalListRequestId );
// If we hadn't properly detected that a matching context was unvailable, we might still get an error indicating that it is from the previous call. Handle similarly, but we need
// to destroy the context first.
@@ -3769,7 +3769,7 @@ void SQRNetworkManager_Orbis::GetExtDataForRoom( SceNpMatching2RoomId roomId, vo
m_FriendSessionUpdatedFn(false, m_pParamFriendSessionUpdated);
return;
};
// Kicked off an asynchronous thing that will create a matching context, and then call this method back again (with nullptr params) once done, so we can reattempt. Don't do anything more now.
// Kicked off an asynchronous thing that will create a matching context, and then call this method back again (with NULL params) once done, so we can reattempt. Don't do anything more now.
if( m_state == SNM_INT_STATE_IDLE_RECREATING_MATCHING_CONTEXT )
{
return;
@@ -3907,7 +3907,7 @@ void SQRNetworkManager_Orbis::AttemptPSNSignIn(int (*SignInCompleteCallbackFn)(v
//s_signInCompleteCallbackIfFailed=false;
//s_SignInCompleteCallbackFn(s_SignInCompleteParam, false, iPad);
}
//s_SignInCompleteCallbackFn = nullptr;
//s_SignInCompleteCallbackFn = NULL;
}
}
}
@@ -4145,11 +4145,11 @@ void SQRNetworkManager_Orbis::NotifyRealtimePlusFeature(int iQuadrant)
// bool isSignedIn = ProfileManager.IsSignedInLive(s_SignInCompleteCallbackPad);
//
// s_SignInCompleteCallbackFn(s_SignInCompleteParam, isSignedIn, s_SignInCompleteCallbackPad);
// s_SignInCompleteCallbackFn = nullptr;
// s_SignInCompleteCallbackFn = NULL;
// s_SignInCompleteCallbackPad = -1;
// }
// else
// {
// app.DebugPrintf("============ Calling CallSignInCompleteCallback but s_SignInCompleteCallbackFn is nullptr\n");
// app.DebugPrintf("============ Calling CallSignInCompleteCallback but s_SignInCompleteCallbackFn is NULL\n");
// }
//}

View File

@@ -139,7 +139,7 @@ private:
void LocalDataSend(SQRNetworkPlayer *playerFrom, SQRNetworkPlayer *playerTo, const void *data, unsigned int dataSize);
int GetSessionIndex(SQRNetworkPlayer *player);
bool AddRemotePlayersAndSync( SceNpMatching2RoomMemberId memberId, int playerMask, bool *isFull = nullptr );
bool AddRemotePlayersAndSync( SceNpMatching2RoomMemberId memberId, int playerMask, bool *isFull = NULL );
void RemoveRemotePlayersAndSync( SceNpMatching2RoomMemberId memberId, int mask );
void RemoveNetworkPlayers( int mask );
void SetLocalPlayersAndSync();

View File

@@ -9,22 +9,22 @@ bool SonyCommerce_Orbis::m_bCommerceInitialised = false;
// SceNpCommerce2SessionInfo SonyCommerce_Orbis::m_sessionInfo;
SonyCommerce_Orbis::State SonyCommerce_Orbis::m_state = e_state_noSession;
int SonyCommerce_Orbis::m_errorCode = 0;
LPVOID SonyCommerce_Orbis::m_callbackParam = nullptr;
LPVOID SonyCommerce_Orbis::m_callbackParam = NULL;
void* SonyCommerce_Orbis::m_receiveBuffer = nullptr;
void* SonyCommerce_Orbis::m_receiveBuffer = NULL;
SonyCommerce_Orbis::Event SonyCommerce_Orbis::m_event;
std::queue<SonyCommerce_Orbis::Message> SonyCommerce_Orbis::m_messageQueue;
std::vector<SonyCommerce_Orbis::ProductInfo>* SonyCommerce_Orbis::m_pProductInfoList = nullptr;
SonyCommerce_Orbis::ProductInfoDetailed* SonyCommerce_Orbis::m_pProductInfoDetailed = nullptr;
SonyCommerce_Orbis::ProductInfo* SonyCommerce_Orbis::m_pProductInfo = nullptr;
std::vector<SonyCommerce_Orbis::ProductInfo>* SonyCommerce_Orbis::m_pProductInfoList = NULL;
SonyCommerce_Orbis::ProductInfoDetailed* SonyCommerce_Orbis::m_pProductInfoDetailed = NULL;
SonyCommerce_Orbis::ProductInfo* SonyCommerce_Orbis::m_pProductInfo = NULL;
SonyCommerce_Orbis::CategoryInfo* SonyCommerce_Orbis::m_pCategoryInfo = nullptr;
const char* SonyCommerce_Orbis::m_pProductID = nullptr;
char* SonyCommerce_Orbis::m_pCategoryID = nullptr;
SonyCommerce_Orbis::CategoryInfo* SonyCommerce_Orbis::m_pCategoryInfo = NULL;
const char* SonyCommerce_Orbis::m_pProductID = NULL;
char* SonyCommerce_Orbis::m_pCategoryID = NULL;
SonyCommerce_Orbis::CheckoutInputParams SonyCommerce_Orbis::m_checkoutInputParams;
SonyCommerce_Orbis::DownloadListInputParams SonyCommerce_Orbis::m_downloadInputParams;
SonyCommerce_Orbis::CallbackFunc SonyCommerce_Orbis::m_callbackFunc = nullptr;
SonyCommerce_Orbis::CallbackFunc SonyCommerce_Orbis::m_callbackFunc = NULL;
// sys_memory_container_t SonyCommerce_Orbis::m_memContainer = SYS_MEMORY_CONTAINER_ID_INVALID;
bool SonyCommerce_Orbis::m_bUpgradingTrial = false;
@@ -38,7 +38,7 @@ bool SonyCommerce_Orbis::m_contextCreated=false; ///< npcommerce2 cont
SonyCommerce_Orbis::Phase SonyCommerce_Orbis::m_currentPhase = e_phase_stopped; ///< Current commerce2 util
// char SonyCommerce_Orbis::m_commercebuffer[SCE_NP_COMMERCE2_RECV_BUF_SIZE];
C4JThread* SonyCommerce_Orbis::m_tickThread = nullptr;
C4JThread* SonyCommerce_Orbis::m_tickThread = NULL;
bool SonyCommerce_Orbis::m_bLicenseChecked=false; // Check the trial/full license for the game
@@ -52,12 +52,12 @@ sce::Toolkit::NP::Utilities::Future<sce::Toolkit::NP::ProductInfoDetailed> g_d
SonyCommerce_Orbis::ProductInfoDetailed s_trialUpgradeProductInfoDetailed;
void SonyCommerce_Orbis::Delete()
{
m_pProductInfoList=nullptr;
m_pProductInfoDetailed=nullptr;
m_pProductInfo=nullptr;
m_pCategoryInfo = nullptr;
m_pProductID = nullptr;
m_pCategoryID = nullptr;
m_pProductInfoList=NULL;
m_pProductInfoDetailed=NULL;
m_pProductInfo=NULL;
m_pCategoryInfo = NULL;
m_pProductID = NULL;
m_pCategoryID = NULL;
}
void SonyCommerce_Orbis::Init()
@@ -95,7 +95,7 @@ bool SonyCommerce_Orbis::LicenseChecked()
void SonyCommerce_Orbis::CheckForTrialUpgradeKey()
{
StorageManager.CheckForTrialUpgradeKey(CheckForTrialUpgradeKey_Callback, nullptr);
StorageManager.CheckForTrialUpgradeKey(CheckForTrialUpgradeKey_Callback, NULL);
}
int SonyCommerce_Orbis::Shutdown()
@@ -112,7 +112,7 @@ int SonyCommerce_Orbis::Shutdown()
DeleteCriticalSection(&m_queueLock);
// clear any possible callback function
m_callbackFunc = nullptr;
m_callbackFunc = NULL;
return ret;
}
@@ -582,7 +582,7 @@ int SonyCommerce_Orbis::createContext()
// }
//
// // Create commerce2 context
// ret = sceNpCommerce2CreateCtx(SCE_NP_COMMERCE2_VERSION, &npId, commerce2Handler, nullptr, &m_contextId);
// ret = sceNpCommerce2CreateCtx(SCE_NP_COMMERCE2_VERSION, &npId, commerce2Handler, NULL, &m_contextId);
// if (ret < 0)
// {
// app.DebugPrintf(4,"createContext sceNpCommerce2CreateCtx problem\n");
@@ -657,7 +657,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
case sce::Toolkit::NP::Event::UserEvent::commerceGotCategoryInfo:
{
copyCategoryInfo(m_pCategoryInfo, g_categoryInfo.get());
m_pCategoryInfo = nullptr;
m_pCategoryInfo = NULL;
m_event = e_event_commerceGotCategoryInfo;
break;
}
@@ -665,7 +665,7 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
case sce::Toolkit::NP::Event::UserEvent::commerceGotProductList:
{
copyProductList(m_pProductInfoList, g_productList.get());
m_pProductInfoDetailed = nullptr;
m_pProductInfoDetailed = NULL;
m_event = e_event_commerceGotProductList;
break;
}
@@ -675,12 +675,12 @@ void SonyCommerce_Orbis::commerce2Handler( const sce::Toolkit::NP::Event& event)
if(m_pProductInfoDetailed)
{
copyDetailedProductInfo(m_pProductInfoDetailed, g_detailedProductInfo.get());
m_pProductInfoDetailed = nullptr;
m_pProductInfoDetailed = NULL;
}
else
{
copyAddDetailedProductInfo(m_pProductInfo, g_detailedProductInfo.get());
m_pProductInfo = nullptr;
m_pProductInfo = NULL;
}
m_event = e_event_commerceGotDetailedProductInfo;
break;
@@ -1027,7 +1027,7 @@ void SonyCommerce_Orbis::processEvent()
case e_event_commerceProductBrowseFinished:
app.DebugPrintf(4,"e_event_commerceProductBrowseFinished succeeded: 0x%x\n", m_errorCode);
if(m_callbackFunc!=nullptr)
if(m_callbackFunc!=NULL)
{
runCallback();
}
@@ -1076,7 +1076,7 @@ void SonyCommerce_Orbis::processEvent()
}
// 4J-PB - if there's been an error - like dlc already purchased, the runcallback has already happened, and will crash this time
if(m_callbackFunc!=nullptr)
if(m_callbackFunc!=NULL)
{
runCallback();
}
@@ -1094,7 +1094,7 @@ void SonyCommerce_Orbis::processEvent()
}
// 4J-PB - if there's been an error - like dlc already purchased, the runcallback has already happened, and will crash this time
if(m_callbackFunc!=nullptr)
if(m_callbackFunc!=NULL)
{
runCallback();
}
@@ -1154,8 +1154,8 @@ void SonyCommerce_Orbis::CreateSession( CallbackFunc cb, LPVOID lpParam )
m_messageQueue.push(e_message_commerceEnd);
m_event = e_event_commerceSessionCreated;
if(m_tickThread == nullptr)
m_tickThread = new C4JThread(TickLoop, nullptr, "SonyCommerce_Orbis tick");
if(m_tickThread == NULL)
m_tickThread = new C4JThread(TickLoop, NULL, "SonyCommerce_Orbis tick");
if(m_tickThread->isRunning() == false)
{
m_currentPhase = e_phase_idle;

View File

@@ -107,14 +107,14 @@ class SonyCommerce_Orbis : public SonyCommerce
{
assert(m_callbackFunc);
CallbackFunc func = m_callbackFunc;
m_callbackFunc = nullptr;
m_callbackFunc = NULL;
if(func)
func(m_callbackParam, m_errorCode);
m_errorCode = SCE_OK;
}
static void setCallback(CallbackFunc cb,LPVOID lpParam)
{
assert(m_callbackFunc == nullptr);
assert(m_callbackFunc == NULL);
m_callbackFunc = cb;
m_callbackParam = lpParam;
}

View File

@@ -100,16 +100,16 @@ void SonyHttp_Orbis::printSslError(SceInt32 sslErr, SceUInt32 sslErrDetail)
void SonyHttp_Orbis::printSslCertInfo(int libsslCtxId,SceSslCert *sslCert)
{
SceInt32 ret;
SceUChar8 *sboData = nullptr ;
SceUChar8 *sboData = NULL ;
SceSize sboLen, counter;
ret = sceSslGetSerialNumber(libsslCtxId, sslCert, nullptr, &sboLen);
ret = sceSslGetSerialNumber(libsslCtxId, sslCert, NULL, &sboLen);
if (ret < 0){
app.DebugPrintf("sceSslGetSerialNumber() returns 0x%x\n", ret);
}
else {
sboData = static_cast<SceUChar8 *>(malloc(sboLen));
if ( sboData != nullptr ) {
sboData = (SceUChar8*)malloc(sboLen);
if ( sboData != NULL ) {
ret = sceSslGetSerialNumber(libsslCtxId, sslCert, sboData, &sboLen);
if (ret < 0){
app.DebugPrintf ("sceSslGetSerialNumber() returns 0x%x\n", ret);
@@ -141,10 +141,10 @@ SceInt32 SonyHttp_Orbis::sslCallback(int libsslCtxId,unsigned int verifyErr,SceS
(void)userArg;
app.DebugPrintf("Ssl callback:\n");
app.DebugPrintf("\tbase tmpl[%x]\n", (*static_cast<SceInt32 *>(userArg)) );
app.DebugPrintf("\tbase tmpl[%x]\n", (*(SceInt32*)(userArg)) );
if (verifyErr != 0){
printSslError(static_cast<SceInt32>(SCE_HTTPS_ERROR_CERT), verifyErr);
printSslError((SceInt32)SCE_HTTPS_ERROR_CERT, verifyErr);
}
for (i = 0; i < certNum; i++){
printSslCertInfo(libsslCtxId,sslCert[i]);
@@ -202,7 +202,7 @@ bool SonyHttp_Orbis::http_get(const char *targetUrl, void** ppOutData, int* pDat
}
/* Register SSL callback */
ret = sceHttpsSetSslCallback(tmplId, sslCallback, static_cast<void *>(&tmplId));
ret = sceHttpsSetSslCallback(tmplId, sslCallback, (void*)&tmplId);
if (ret < 0)
{
app.DebugPrintf("sceHttpsSetSslCallback() error: 0x%08X\n", ret);
@@ -225,7 +225,7 @@ bool SonyHttp_Orbis::http_get(const char *targetUrl, void** ppOutData, int* pDat
}
reqId = ret;
ret = sceHttpSendRequest(reqId, nullptr, 0);
ret = sceHttpSendRequest(reqId, NULL, 0);
if (ret < 0)
{
app.DebugPrintf("sceHttpSendRequest() error: 0x%08X\n", ret);

View File

@@ -26,7 +26,7 @@ static SceRemoteStorageData s_getDataOutput;
void SonyRemoteStorage_Orbis::staticInternalCallback(const SceRemoteStorageEvent event, int32_t retCode, void * userData)
{
static_cast<SonyRemoteStorage_Orbis *>(userData)->internalCallback(event, retCode);
((SonyRemoteStorage_Orbis*)userData)->internalCallback(event, retCode);
}
void SonyRemoteStorage_Orbis::internalCallback(const SceRemoteStorageEvent event, int32_t retCode)
{
@@ -196,7 +196,7 @@ bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, LPVOID lpParam)
// memcpy(clientId.id, CLIENT_ID, strlen(CLIENT_ID));
// authParams.pClientId = &clientId;
// ret = sceNpAuthGetAuthorizationCode(reqId, &authParams, &authCode, nullptr);
// ret = sceNpAuthGetAuthorizationCode(reqId, &authParams, &authCode, NULL);
// if (ret < 0) {
// app.DebugPrintf("Failed to get auth code 0x%x\n", ret);
// }
@@ -223,7 +223,7 @@ bool SonyRemoteStorage_Orbis::init(CallbackFunc cb, LPVOID lpParam)
params.timeout.sendMs = 120 * 1000; //120 seconds is the default
params.pool.memPoolSize = 7 * 1024 * 1024;
if(m_memPoolBuffer == nullptr)
if(m_memPoolBuffer == NULL)
m_memPoolBuffer = malloc(params.pool.memPoolSize);
params.pool.memPoolBuffer = m_memPoolBuffer;

View File

@@ -67,7 +67,7 @@ void LoadPCMVoiceData()
{
char filename[64];
sprintf(filename, "voice%d.pcm", i+1);
HANDLE file = CreateFile(filename, GENERIC_READ, 0, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
HANDLE file = CreateFile(filename, GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
DWORD dwHigh=0;
g_loadedPCMVoiceDataSizes[i] = GetFileSize(file,&dwHigh);
@@ -75,7 +75,7 @@ void LoadPCMVoiceData()
{
g_loadedPCMVoiceData[i] = new char[g_loadedPCMVoiceDataSizes[i]];
DWORD bytesRead;
BOOL bSuccess = ReadFile(file, g_loadedPCMVoiceData[i], g_loadedPCMVoiceDataSizes[i], &bytesRead, nullptr);
BOOL bSuccess = ReadFile(file, g_loadedPCMVoiceData[i], g_loadedPCMVoiceDataSizes[i], &bytesRead, NULL);
assert(bSuccess);
}
g_loadedPCMVoiceDataPos[i] = 0;
@@ -274,7 +274,7 @@ void SQRVoiceConnection::readRemoteData()
if( dataSize > 0 )
{
VoicePacket packet;
int bytesRead = sceRudpRead( m_rudpCtx, &packet, dataSize, 0, nullptr );
int bytesRead = sceRudpRead( m_rudpCtx, &packet, dataSize, 0, NULL );
unsigned int writeSize;
if( bytesRead > 0 )
{
@@ -468,7 +468,7 @@ void SonyVoiceChat_Orbis::sendAllVoiceData()
if(m_localVoiceDevices[i].isValid())
{
bool bChatRestricted = false;
ProfileManager.GetChatAndContentRestrictions(i,true,&bChatRestricted,nullptr,nullptr);
ProfileManager.GetChatAndContentRestrictions(i,true,&bChatRestricted,NULL,NULL);
if(bChatRestricted)
{
@@ -928,7 +928,7 @@ void SonyVoiceChat_Orbis::initLocalPlayer(int playerIndex)
if(m_localVoiceDevices[playerIndex].isValid() == false)
{
bool chatRestricted = false;
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,nullptr,nullptr);
ProfileManager.GetChatAndContentRestrictions(ProfileManager.GetPrimaryPad(),false,&chatRestricted,NULL,NULL);
// create all device ports required
m_localVoiceDevices[playerIndex].init(ProfileManager.getUserID(playerIndex), chatRestricted);
@@ -965,7 +965,7 @@ SQRVoiceConnection* SonyVoiceChat_Orbis::GetVoiceConnectionFromRudpCtx( int Rudp
if(m_remoteConnections[i]->m_rudpCtx == RudpCtx)
return m_remoteConnections[i];
}
return nullptr;
return NULL;
}
void SonyVoiceChat_Orbis::connectPlayerToAll( int playerIndex )
@@ -990,7 +990,7 @@ SQRVoiceConnection* SonyVoiceChat_Orbis::getVoiceConnectionFromRoomMemberID( Sce
}
}
return nullptr;
return NULL;
}
void SonyVoiceChat_Orbis::disconnectLocalPlayer( int localIdx )