Wiimote: Fixed semi-frequent hanging that would occur when closing the configuration window
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2080 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4f4469545e
commit
d6c0d5b977
|
@ -480,12 +480,18 @@ void DoState(void* ptr, int mode) {}
|
||||||
|
|
||||||
void Shutdown(void)
|
void Shutdown(void)
|
||||||
{
|
{
|
||||||
g_Shutdown = true;
|
// Stop the loop in the thread
|
||||||
|
g_Shutdown = true;
|
||||||
|
|
||||||
|
// Sleep this thread to wait for activity in g_pReadThread to stop entirely
|
||||||
|
Sleep(100);
|
||||||
|
|
||||||
// Stop the thread
|
// Stop the thread
|
||||||
if (g_pReadThread != NULL)
|
if (g_pReadThread != NULL)
|
||||||
{
|
{
|
||||||
g_pReadThread->WaitForDeath();
|
// This sometimes hangs for some reason so I'm trying to disable it
|
||||||
|
// It seemed to hang in WaitForSingleObject(), but I don't know why
|
||||||
|
//g_pReadThread->WaitForDeath();
|
||||||
delete g_pReadThread;
|
delete g_pReadThread;
|
||||||
g_pReadThread = NULL;
|
g_pReadThread = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue