mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user