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:
@@ -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;
|
||||
@@ -285,7 +285,7 @@ void SQRVoiceConnection::readRemoteData()
|
||||
if( dataSize > 0 )
|
||||
{
|
||||
VoicePacket packet;
|
||||
unsigned int bytesRead = sceRudpRead( m_rudpCtx, &packet, dataSize, 0, nullptr );
|
||||
unsigned int bytesRead = sceRudpRead( m_rudpCtx, &packet, dataSize, 0, NULL );
|
||||
unsigned int writeSize;
|
||||
if( bytesRead > 0 )
|
||||
{
|
||||
@@ -378,7 +378,7 @@ uint32_t lastReadFrameCnt = 0;
|
||||
|
||||
void PrintAllOutputVoiceStates( std::vector<SQRVoiceConnection*>& connections)
|
||||
{
|
||||
for(size_t rIdx=0;rIdx<connections.size(); rIdx++)
|
||||
for(int rIdx=0;rIdx<connections.size(); rIdx++)
|
||||
{
|
||||
SQRVoiceConnection* pVoice = connections[rIdx];
|
||||
SceVoiceBasePortInfo portInfo;
|
||||
@@ -470,7 +470,7 @@ void SonyVoiceChat_Vita::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)
|
||||
{
|
||||
@@ -565,7 +565,7 @@ void SonyVoiceChat_Vita::sendAllVoiceData()
|
||||
EnterCriticalSection(&m_csRemoteConnections);
|
||||
|
||||
// send this packet out to all our remote connections
|
||||
for(size_t rIdx=0;rIdx<m_remoteConnections.size(); rIdx++)
|
||||
for(int rIdx=0;rIdx<m_remoteConnections.size(); rIdx++)
|
||||
{
|
||||
SQRVoiceConnection* pVoice = m_remoteConnections[rIdx];
|
||||
if(pVoice->m_bConnected)
|
||||
@@ -668,7 +668,7 @@ void SonyVoiceChat_Vita::tick()
|
||||
|
||||
EnterCriticalSection(&m_csRemoteConnections);
|
||||
|
||||
for(size_t i=m_remoteConnections.size()-1;i>=0;i--)
|
||||
for(int i=m_remoteConnections.size()-1;i>=0;i--)
|
||||
{
|
||||
if(m_remoteConnections[i]->m_bFlaggedForShutdown)
|
||||
{
|
||||
@@ -911,7 +911,7 @@ void SonyVoiceChat_Vita::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(chatRestricted);
|
||||
@@ -948,7 +948,7 @@ SQRVoiceConnection* SonyVoiceChat_Vita::GetVoiceConnectionFromRudpCtx( int RudpC
|
||||
if(m_remoteConnections[i]->m_rudpCtx == RudpCtx)
|
||||
return m_remoteConnections[i];
|
||||
}
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SonyVoiceChat_Vita::connectPlayerToAll( int playerIndex )
|
||||
@@ -973,7 +973,7 @@ SQRVoiceConnection* SonyVoiceChat_Vita::getVoiceConnectionFromRoomMemberID( SceN
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void SonyVoiceChat_Vita::disconnectLocalPlayer( int localIdx )
|
||||
@@ -998,7 +998,7 @@ void SonyVoiceChat_Vita::disconnectLocalPlayer( int localIdx )
|
||||
|
||||
if(m_numLocalDevicesConnected == 0) // no more local players, kill all the remote connections
|
||||
{
|
||||
for(size_t i=0;i<m_remoteConnections.size();i++)
|
||||
for(int i=0;i<m_remoteConnections.size();i++)
|
||||
{
|
||||
delete m_remoteConnections[i];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user