LCEMP v1.1.0, bugfixes, multithreading server, local leaderboard, performance fixes, and more

This commit is contained in:
NOTPIES committed 2026-04-20 18:56:39 -04:00
1 parent fadeee4192
commit 7e7668c7fa
88 files changed
+4825 -634

No files matched your search

@@ -68,7 +68,43 @@ HRESULT CScene_FullscreenProgress::OnInit( XUIMessageInit* pInitData, BOOL& bHan
HRESULT CScene_FullscreenProgress::OnDestroy()
{
if( thread != NULL && thread != INVALID_HANDLE_VALUE )
delete thread;
{
if( !threadStarted )
{
delete thread;
}
else
{
int code = thread->GetExitCode();
DWORD exitcode = *((DWORD *)&code);
if( exitcode == STILL_ACTIVE && m_cancelFunc != NULL && !m_bWasCancelled )
{
m_bWasCancelled = true;
m_cancelFunc(m_cancelFuncParam);
}
if( exitcode == STILL_ACTIVE )
{
DWORD waitResult = thread->WaitForCompletion(5000);
if( waitResult == WAIT_TIMEOUT )
{
app.DebugPrintf("XUI_FullscreenProgress: skipping active thread delete to avoid shutdown race\n");
thread = NULL;
}
else
{
delete thread;
thread = NULL;
}
}
else
{
delete thread;
thread = NULL;
}
}
}
if( m_CompletionData != NULL )
delete m_CompletionData;