Merge branch 'dev' into feat/iggy-dev

This commit is contained in:
Tropical
2026-03-15 15:30:59 -05:00
18 changed files with 201 additions and 184 deletions
@@ -728,7 +728,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
@@ -759,7 +759,7 @@ void ConsoleSaveFileOriginal::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
@@ -1344,7 +1344,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Check buffer size: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
@@ -1367,7 +1367,7 @@ void ConsoleSaveFileSplit::Flush(bool autosave, bool updateThumbnail) {
QueryPerformanceCounter(&qwNewTime);
qwDeltaTime.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime = fSecsPerTick * ((FLOAT)(qwDeltaTime.QuadPart));
fElapsedTime = fSecsPerTick * static_cast<float>(qwDeltaTime.QuadPart);
app.DebugPrintf("Compress: Elapsed time %f\n", fElapsedTime);
PIXEndNamedEvent();
+2 -2
View File
@@ -3450,8 +3450,8 @@ void Level::checkLight(LightLayer::variety layer, int xc, int yc, int zc,
{
QueryPerformanceCounter( &qwNewTime );
qwDeltaTime2.QuadPart = qwNewTime.QuadPart - qwTime.QuadPart;
fElapsedTime1 = fSecsPerTick * ((FLOAT)(qwDeltaTime1.QuadPart));
fElapsedTime2 = fSecsPerTick * ((FLOAT)(qwDeltaTime2.QuadPart));
fElapsedTime1 = fSecsPerTick * static_cast<float>(qwDeltaTime1.QuadPart);
fElapsedTime2 = fSecsPerTick * static_cast<float>(qwDeltaTime2.QuadPart);
if( ( darktcc > 0 ) | ( tcc > 0 ) )
{
printf("%d %d %d %f + %f = %f\n", darktcc, tcc, darktcc + tcc, fElapsedTime1 * 1000.0f, fElapsedTime2 * 1000.0f, ( fElapsedTime1 + fElapsedTime2 ) * 1000.0f);
+13 -11
View File
@@ -113,8 +113,10 @@ C4JThread::C4JThread(C4JThreadStartFunc* startFunc, void* param,
#else
m_threadID = 0;
m_threadHandle = 0;
DWORD threadID = 0;
m_threadHandle = CreateThread(NULL, m_stackSize, entryPoint, this,
CREATE_SUSPENDED, &m_threadID);
CREATE_SUSPENDED, &threadID);
m_threadID = threadID;
#endif
EnterCriticalSection(&ms_threadListCS);
ms_threadList.push_back(this);
@@ -383,7 +385,7 @@ void C4JThread::SetPriority(int priority) {
#endif // __PS3__
}
DWORD C4JThread::WaitForCompletion(int timeoutMs) {
std::uint32_t C4JThread::WaitForCompletion(int timeoutMs) {
#ifdef __PS3__
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
return m_completionFlag->WaitForSignal(timeoutMs);
@@ -454,7 +456,7 @@ C4JThread* C4JThread::getCurrentThread() {
#elif defined __PSVITA__
SceUID currThreadID = sceKernelGetThreadId();
#else
DWORD currThreadID = GetCurrentThreadId();
std::uint32_t currThreadID = GetCurrentThreadId();
#endif //__PS3__
EnterCriticalSection(&ms_threadListCS);
@@ -543,7 +545,7 @@ void C4JThread::Event::Clear() {
#endif //__PS3__
}
DWORD C4JThread::Event::WaitForSignal(int timeoutMs) {
std::uint32_t C4JThread::Event::WaitForSignal(int timeoutMs) {
#ifdef __PS3__
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
int timoutMicrosecs = timeoutMs * 1000;
@@ -685,8 +687,8 @@ void C4JThread::EventArray::ClearAll() {
for (int i = 0; i < m_size; i++) Clear(i);
}
DWORD C4JThread::EventArray::WaitForSingle(int index, int timeoutMs) {
DWORD retVal;
std::uint32_t C4JThread::EventArray::WaitForSingle(int index, int timeoutMs) {
std::uint32_t retVal;
#ifdef __PS3__
int timeoutMicrosecs;
if (timeoutMs == INFINITE)
@@ -777,8 +779,8 @@ DWORD C4JThread::EventArray::WaitForSingle(int index, int timeoutMs) {
return retVal;
}
DWORD C4JThread::EventArray::WaitForAll(int timeoutMs) {
DWORD retVal;
std::uint32_t C4JThread::EventArray::WaitForAll(int timeoutMs) {
std::uint32_t retVal;
#ifdef __PS3__
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
int timoutMicrosecs = timeoutMs * 1000;
@@ -871,7 +873,7 @@ DWORD C4JThread::EventArray::WaitForAll(int timeoutMs) {
return retVal;
}
DWORD C4JThread::EventArray::WaitForAny(int timeoutMs) {
std::uint32_t C4JThread::EventArray::WaitForAny(int timeoutMs) {
#ifdef __PS3__
if (timeoutMs == INFINITE) timeoutMs = SYS_NO_TIMEOUT;
int timoutMicrosecs = timeoutMs * 1000;
@@ -1015,7 +1017,7 @@ void C4JThread::EventQueue::threadPoll() {
if (m_threadInitFunc) m_threadInitFunc();
while (ShutdownManager::ShouldRun(ShutdownManager::eEventQueueThreads)) {
DWORD err = m_startEvent->WaitForAny(INFINITE);
std::uint32_t err = m_startEvent->WaitForAny(INFINITE);
if (err == WAIT_OBJECT_0) {
bool bListEmpty = true;
do {
@@ -1060,4 +1062,4 @@ void C4JThread::PopAffinity() {
assert(err == SCE_OK);
}
#endif // __ORBIS__
#endif // __ORBIS__
+6 -6
View File
@@ -64,7 +64,7 @@ public:
~Event();
void Set();
void Clear();
DWORD WaitForSignal(int timeoutMs);
std::uint32_t WaitForSignal(int timeoutMs);
private:
EMode m_mode;
@@ -89,9 +89,9 @@ public:
void Clear(int index);
void SetAll();
void ClearAll();
DWORD WaitForAll(int timeoutMs);
DWORD WaitForAny(int timeoutMs);
DWORD WaitForSingle(int index, int timeoutMs);
std::uint32_t WaitForAll(int timeoutMs);
std::uint32_t WaitForAny(int timeoutMs);
std::uint32_t WaitForSingle(int index, int timeoutMs);
#ifdef __PS3__
void Cancel();
#endif
@@ -153,7 +153,7 @@ public:
bool hasStarted() { return m_hasStarted; }
void SetProcessor(int proc);
void SetPriority(int priority);
DWORD WaitForCompletion(int timeoutMs);
std::uint32_t WaitForCompletion(int timeoutMs);
int GetExitCode();
char* getName() { return m_threadName; }
static void Sleep(int millisecs);
@@ -210,7 +210,7 @@ private:
int m_priority;
static SceInt32 entryPoint(SceSize argSize, void* pArgBlock);
#else
DWORD m_threadID;
std::uint32_t m_threadID;
HANDLE m_threadHandle;
Event* m_completionFlag;
static DWORD WINAPI entryPoint(LPVOID lpParam);