Wiimote: Fixed the hanging for real. Any call to a function in the wxDialog frame class while the main thread is in a WaitForSingleObject() loop or any other loop will hang the g_pReadThread execution until sometime after that loop has ended. So we must wait for pReadThread to stop from the wxDialog with a timer, we can not use any loop in the main thread to wait for it to stop.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2083 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
John Peterson
2009-02-03 07:43:52 +00:00
parent f999ae94df
commit 5972f886ab
6 changed files with 63 additions and 35 deletions

View File

@ -76,7 +76,7 @@ HINSTANCE g_hInstance;
#if defined(HAVE_WX) && HAVE_WX
wxWindow win;
ConfigDialog *frame;
ConfigDialog *frame = NULL;
class wxDLLApp : public wxApp
{
@ -159,11 +159,12 @@ void DllConfig(HWND _hParent)
//Console::Open();
DoInitialize();
g_FrameOpen = true;
frame = new ConfigDialog(&win);
frame->ShowModal();
//frame.Show();
g_FrameOpen = true;
/* We don't need to use ShowModal() anymore becaue FreeLibrary() is not called after this function
anymore */
//frame->ShowModal();
frame->Show();
#ifdef _WIN32
win.SetHWND(0);
@ -200,7 +201,8 @@ extern "C" void Shutdown(void)
if(frame) frame->UpdateGUI();
#endif
// Don't shut down the wiimote when we still have the window open
/* Don't shut down the wiimote when we still have the config window open, we may still want
want to use the Wiimote in the config window. */
return;
}