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

@ -60,8 +60,9 @@ class ConfigDialog : public wxDialog
void DoRecordMovement(u8 _x, u8 _y, u8 _z, const u8 *_IR, int IRBytes);
void DoRecordA(bool Pressed);
void ConvertToString();
wxTimer *m_TimeoutTimer, *m_TimeoutATimer;
wxTimer *m_TimeoutTimer, *m_ShutDownTimer, *m_TimeoutATimer;
void Update(wxTimerEvent& WXUNUSED(event));
void ShutDown(wxTimerEvent& WXUNUSED(event));
void UpdateA(wxTimerEvent& WXUNUSED(event));
private:
@ -105,7 +106,7 @@ class ConfigDialog : public wxDialog
ID_CLOSE = 1000,
ID_APPLY,
ID_ABOUTOGL,
IDTM_EXIT, IDTM_UPDATE, IDTM_UPDATEA, // Timer
IDTM_EXIT, IDTM_UPDATE, IDTM_SHUTDOWN, IDTM_UPDATEA, // Timer
ID_NOTEBOOK,
ID_PAGEEMU,