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:
@@ -16,13 +16,13 @@ static const unsigned int NUM_SUBMIT_JOBS = 128;
|
||||
#define DMA_ALIGNMENT (128)
|
||||
#define JOBHEADER_SYMBOL(JobName) _binary_jqjob_##JobName##_jobbin2_jobheader
|
||||
|
||||
C4JSpursJobQueue* C4JSpursJobQueue::m_pMainJobQueue = nullptr;
|
||||
C4JSpursJobQueue* C4JSpursJobQueue::m_pMainJobQueue = NULL;
|
||||
|
||||
uint16_t C4JSpursJobQueue::Port::s_jobTagBitmask = 0;
|
||||
C4JSpursJobQueue::Port* C4JSpursJobQueue::Port::s_allocatedPorts[16] = {nullptr,nullptr,nullptr,nullptr,
|
||||
nullptr,nullptr,nullptr,nullptr,
|
||||
nullptr,nullptr,nullptr,nullptr,
|
||||
nullptr,nullptr,nullptr,nullptr };
|
||||
C4JSpursJobQueue::Port* C4JSpursJobQueue::Port::s_allocatedPorts[16] = {NULL,NULL,NULL,NULL,
|
||||
NULL,NULL,NULL,NULL,
|
||||
NULL,NULL,NULL,NULL,
|
||||
NULL,NULL,NULL,NULL };
|
||||
bool C4JSpursJobQueue::Port::s_initialised;
|
||||
CRITICAL_SECTION C4JSpursJobQueue::Port::s_lock;
|
||||
|
||||
@@ -43,7 +43,7 @@ C4JSpursJobQueue::C4JSpursJobQueue()
|
||||
|
||||
//E create jobQueue
|
||||
pJobQueue = (JobQueue<JOB_QUEUE_DEPTH>*)memalign(CELL_SPURS_JOBQUEUE_ALIGN, sizeof(JobQueue<JOB_QUEUE_DEPTH>));
|
||||
assert(pJobQueue != nullptr);
|
||||
assert(pJobQueue != NULL);
|
||||
|
||||
ret = JobQueue<JOB_QUEUE_DEPTH>::create( pJobQueue,
|
||||
spurs,
|
||||
@@ -168,7 +168,7 @@ int C4JSpursJobQueue::Port::getFreeJobTag()
|
||||
void C4JSpursJobQueue::Port::releaseJobTag( int tag )
|
||||
{
|
||||
s_jobTagBitmask &= ~(1<<tag);
|
||||
s_allocatedPorts[tag] = nullptr;
|
||||
s_allocatedPorts[tag] = NULL;
|
||||
}
|
||||
|
||||
void C4JSpursJobQueue::Port::destroyAll()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
// void CompressedTileStorage::compress_SPUSendEvent(int upgradeBlock/*=-1*/)
|
||||
// {
|
||||
// if(g_pCompressSPUThread == nullptr)
|
||||
// if(g_pCompressSPUThread == NULL)
|
||||
// {
|
||||
// sys_event_port_create(&g_basicEventPort, SYS_EVENT_PORT_LOCAL, SYS_EVENT_PORT_NO_NAME);
|
||||
// sys_event_queue_attribute_t queue_attr = {SYS_SYNC_PRIORITY, SYS_PPU_QUEUE};
|
||||
@@ -194,7 +194,7 @@ private:
|
||||
cell::Spurs::JobQueue::JobQueue<JOB_QUEUE_DEPTH> *pJobQueue;
|
||||
|
||||
public:
|
||||
static C4JSpursJobQueue& getMainJobQueue() {if(m_pMainJobQueue == nullptr) m_pMainJobQueue = new C4JSpursJobQueue; return *m_pMainJobQueue;}
|
||||
static C4JSpursJobQueue& getMainJobQueue() {if(m_pMainJobQueue == NULL) m_pMainJobQueue = new C4JSpursJobQueue; return *m_pMainJobQueue;}
|
||||
|
||||
C4JSpursJobQueue();
|
||||
void shutdown();
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
static const bool sc_verbose = true;
|
||||
|
||||
cell::Spurs::Spurs2* C4JThread_SPU::ms_spurs2Object = nullptr;
|
||||
cell::Spurs::Spurs2* C4JThread_SPU::ms_spurs2Object = NULL;
|
||||
|
||||
void C4JThread_SPU::initSPURS()
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "EdgeZLib.h"
|
||||
#include "edge/zlib/edgezlib_ppu.h"
|
||||
|
||||
static CellSpurs* s_pSpurs = nullptr;
|
||||
static CellSpurs* s_pSpurs = NULL;
|
||||
|
||||
//Set this to 5 if you want deflate/inflate to run in parallel on 5 SPUs.
|
||||
|
||||
@@ -12,7 +12,7 @@ const uint32_t kMaxNumDeflateQueueEntries = 64;
|
||||
static CellSpursEventFlag s_eventFlagDeflate; //Cannot be on stack
|
||||
static CellSpursTaskset s_taskSetDeflate; //Cannot be on stack
|
||||
static EdgeZlibDeflateQHandle s_deflateQueue;
|
||||
static void* s_pDeflateQueueBuffer = nullptr;
|
||||
static void* s_pDeflateQueueBuffer = NULL;
|
||||
static void* s_pDeflateTaskContext[kNumDeflateTasks];
|
||||
static uint32_t s_numElementsToCompress; //Cannot be on stack
|
||||
|
||||
@@ -22,7 +22,7 @@ const uint32_t kMaxNumInflateQueueEntries = 64;
|
||||
static CellSpursEventFlag s_eventFlagInflate; //Cannot be on stack
|
||||
static CellSpursTaskset s_taskSetInflate; //Cannot be on stack
|
||||
static EdgeZlibInflateQHandle s_inflateQueue;
|
||||
static void* s_pInflateQueueBuffer = nullptr;
|
||||
static void* s_pInflateQueueBuffer = NULL;
|
||||
static void* s_pInflateTaskContext[kNumInflateTasks];
|
||||
static uint32_t s_numElementsToDecompress; //Cannot be on stack
|
||||
|
||||
@@ -195,9 +195,9 @@ bool EdgeZLib::Compress(void* pDestination, uint32_t* pDestSize, const void* pSo
|
||||
// The Deflate Task will wake up and process this work.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
uint32_t* pDst = nullptr;
|
||||
uint32_t* pDst = NULL;
|
||||
bool findingSizeOnly = false;
|
||||
if(pDestination == nullptr && *pDestSize == 0)
|
||||
if(pDestination == NULL && *pDestSize == 0)
|
||||
{
|
||||
pDst = (uint32_t*)malloc(SrcSize);
|
||||
findingSizeOnly = true;
|
||||
|
||||
@@ -13,18 +13,18 @@ uint8_t *mallocAndCreateUTF8ArrayFromString(int iID)
|
||||
if( (cd = l10n_get_converter( L10N_UTF16, L10N_UTF8 )) == -1 )
|
||||
{
|
||||
app.DebugPrintf("l10n_get_converter: no such converter\n");
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
l10n_convert_str( cd, wchString, &src_len, nullptr, &dst_len );
|
||||
uint8_t *strUtf8=static_cast<uint8_t *>(malloc(dst_len));
|
||||
l10n_convert_str( cd, wchString, &src_len, NULL, &dst_len );
|
||||
uint8_t *strUtf8=(uint8_t *)malloc(dst_len);
|
||||
memset(strUtf8,0,dst_len);
|
||||
|
||||
result = l10n_convert_str( cd, wchString, &src_len, strUtf8, &dst_len );
|
||||
if( result != ConversionOK )
|
||||
{
|
||||
app.DebugPrintf("l10n_convert: conversion error : 0x%x\n", result);
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return strUtf8;
|
||||
|
||||
@@ -74,8 +74,8 @@ int _wcsicmp( const wchar_t * dst, const wchar_t * src )
|
||||
wchar_t f,l;
|
||||
|
||||
// validation section
|
||||
// _VALIDATE_RETURN(dst != nullptr, EINVAL, _NLSCMPERROR);
|
||||
// _VALIDATE_RETURN(src != nullptr, EINVAL, _NLSCMPERROR);
|
||||
// _VALIDATE_RETURN(dst != NULL, EINVAL, _NLSCMPERROR);
|
||||
// _VALIDATE_RETURN(src != NULL, EINVAL, _NLSCMPERROR);
|
||||
|
||||
do {
|
||||
f = towlower(*dst);
|
||||
@@ -90,7 +90,7 @@ size_t wcsnlen(const wchar_t *wcs, size_t maxsize)
|
||||
{
|
||||
size_t n;
|
||||
|
||||
// Note that we do not check if s == nullptr, because we do not
|
||||
// Note that we do not check if s == NULL, because we do not
|
||||
// return errno_t...
|
||||
|
||||
for (n = 0; n < maxsize && *wcs; n++, wcs++)
|
||||
@@ -134,7 +134,7 @@ VOID GetLocalTime(LPSYSTEMTIME lpSystemTime)
|
||||
lpSystemTime->wMilliseconds = cellRtcGetMicrosecond(&dateTime)/1000;
|
||||
}
|
||||
|
||||
HANDLE CreateEvent(void* lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { PS3_STUBBED; return nullptr; }
|
||||
HANDLE CreateEvent(void* lpEventAttributes, BOOL bManualReset, BOOL bInitialState, LPCSTR lpName) { PS3_STUBBED; return NULL; }
|
||||
VOID Sleep(DWORD dwMilliseconds)
|
||||
{
|
||||
C4JThread::Sleep(dwMilliseconds);
|
||||
@@ -267,8 +267,8 @@ BOOL TlsSetValue(DWORD dwTlsIndex, LPVOID lpTlsValue) { return TLSStoragePS3::In
|
||||
LPVOID VirtualAlloc(LPVOID lpAddress, SIZE_T dwSize, DWORD flAllocationType, DWORD flProtect)
|
||||
{
|
||||
int err;
|
||||
sys_addr_t newAddress = nullptr;
|
||||
if(lpAddress == nullptr)
|
||||
sys_addr_t newAddress = NULL;
|
||||
if(lpAddress == NULL)
|
||||
{
|
||||
// reserve, and possibly commit also
|
||||
int commitSize = 0;
|
||||
@@ -382,7 +382,7 @@ BOOL SetFilePointer(HANDLE hFile, LONG lDistanceToMove, PLONG lpDistanceToMoveHi
|
||||
int fd = (int) hFile;
|
||||
uint64_t pos = 0, bitsToMove = (int64_t) lDistanceToMove;
|
||||
|
||||
if (lpDistanceToMoveHigh != nullptr)
|
||||
if (lpDistanceToMoveHigh != NULL)
|
||||
bitsToMove |= ((uint64_t) (*lpDistanceToMoveHigh)) << 32;
|
||||
|
||||
int whence = 0;
|
||||
@@ -490,7 +490,7 @@ HANDLE CreateFileA(LPCSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode,
|
||||
}
|
||||
else
|
||||
{
|
||||
err = cellFsOpen(filePath, flags, &fd ,nullptr, 0);
|
||||
err = cellFsOpen(filePath, flags, &fd ,NULL, 0);
|
||||
iFilesOpen++;
|
||||
//printf("\n\nFiles Open - %d\n\n",iFilesOpen);
|
||||
}
|
||||
@@ -675,7 +675,7 @@ errno_t _i64toa_s(int64_t _Val, char * _DstBuf, size_t _Size, int _Radix) { if(_
|
||||
|
||||
int _wtoi(const wchar_t *_Str)
|
||||
{
|
||||
return wcstol(_Str, nullptr, 10);
|
||||
return wcstol(_Str, NULL, 10);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ C4JThread::EventArray *ShutdownManager::s_eventArray[eThreadIdCount];
|
||||
void ShutdownManager::Initialise()
|
||||
{
|
||||
#ifdef __PS3__
|
||||
cellSysutilRegisterCallback( 1, SysUtilCallback, nullptr );
|
||||
cellSysutilRegisterCallback( 1, SysUtilCallback, NULL );
|
||||
for( int i = 0; i < eThreadIdCount; i++ )
|
||||
{
|
||||
s_threadShouldRun[i] = true;
|
||||
s_threadRunning[i] = 0;
|
||||
s_eventArray[i] = nullptr;
|
||||
s_eventArray[i] = NULL;
|
||||
}
|
||||
// Special case for storage manager, which we will manually set now to be considered as running - this will be unset by StorageManager.ExitRequest if required
|
||||
s_threadRunning[eStorageManagerThreads] = true;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
|
||||
|
||||
TLSStoragePS3* TLSStoragePS3::m_pInstance = nullptr;
|
||||
TLSStoragePS3* TLSStoragePS3::m_pInstance = NULL;
|
||||
|
||||
BOOL TLSStoragePS3::m_activeList[sc_maxSlots];
|
||||
__thread LPVOID TLSStoragePS3::m_values[sc_maxSlots];
|
||||
@@ -16,7 +16,7 @@ TLSStoragePS3::TLSStoragePS3()
|
||||
for(int i=0;i<sc_maxSlots; i++)
|
||||
{
|
||||
m_activeList[i] = false;
|
||||
m_values[i] = nullptr;
|
||||
m_values[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ int TLSStoragePS3::Alloc()
|
||||
if(m_activeList[i] == false)
|
||||
{
|
||||
m_activeList[i] = true;
|
||||
m_values[i] = nullptr;
|
||||
m_values[i] = NULL;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
@@ -51,7 +51,7 @@ BOOL TLSStoragePS3::Free( DWORD _index )
|
||||
return false; // not been allocated
|
||||
|
||||
m_activeList[_index] = false;
|
||||
m_values[_index] = nullptr;
|
||||
m_values[_index] = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ BOOL TLSStoragePS3::SetValue( DWORD _index, LPVOID _val )
|
||||
LPVOID TLSStoragePS3::GetValue( DWORD _index )
|
||||
{
|
||||
if(m_activeList[_index] == false)
|
||||
return nullptr;
|
||||
return NULL;
|
||||
return m_values[_index];
|
||||
}
|
||||
|
||||
|
||||
@@ -3551,7 +3551,7 @@
|
||||
//
|
||||
// MessageText:
|
||||
//
|
||||
// The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a nullptr string.
|
||||
// The password is too complex to be converted to a LAN Manager password. The LAN Manager password returned is a NULL string.
|
||||
//
|
||||
#define ERROR_NULL_LM_PASSWORD 1304L
|
||||
|
||||
|
||||
Reference in New Issue
Block a user