mirror of
https://git.minecraftlegacy.com/backups/LCEMP.git
synced 2026-12-02 14:21:31 +00:00
LCEMP v1.1.0, bugfixes, multithreading server, local leaderboard, performance fixes, and more
This commit is contained in:
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;
|
||||
|
||||
Reference in new issue
Block a user