Cleanup shutdown on Windows to avoid races.

Was still getting crashes sometimes.
This commit is contained in:
Unknown W. Brackets committed 2013-10-12 01:40:33 -07:00
1 parent 85c013c5b6
commit 21f522746f
5 files changed
+64 -43

No files matched your search

+4 -3
View File
@@ -130,11 +130,12 @@ unsigned int WINAPI TheThread(void *)
while (globalUIState != UISTATE_EXIT)
{
Core_Run();
// We're here again, so the game quit. Restart Core_Run() which controls the UI.
// This way they can load a new game.
Core_UpdateState(CORE_RUNNING);
if (!Core_IsActive())
UpdateUIState(UISTATE_MENU);
Core_Run();
}
shutdown: