diff --git a/Source/Plugins/Plugin_Wiimote/Src/ConfigBasicDlg.cpp b/Source/Plugins/Plugin_Wiimote/Src/ConfigBasicDlg.cpp index 8056e777a7..3c9da08c61 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/ConfigBasicDlg.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/ConfigBasicDlg.cpp @@ -76,8 +76,6 @@ WiimoteBasicConfigDialog::WiimoteBasicConfigDialog(wxWindow *parent, wxWindowID void WiimoteBasicConfigDialog::OnClose(wxCloseEvent& event) { - // necessary as this dialog is only showed/hided - UpdateGUI(); g_FrameOpen = false; EndModal(wxID_CLOSE); } diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.cpp b/Source/Plugins/Plugin_Wiimote/Src/main.cpp index b2e7752b13..51496ff234 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/main.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/main.cpp @@ -183,23 +183,10 @@ void DllConfig(HWND _hParent) #if defined(HAVE_WX) && HAVE_WX - if (!m_BasicConfigFrame) - m_BasicConfigFrame = new WiimoteBasicConfigDialog(GetParentedWxWindow(_hParent)); - else if (!m_BasicConfigFrame->GetParent()->IsShown()) - m_BasicConfigFrame->Close(true); - // Update the GUI (because it was not updated when it had been already open before...) - m_BasicConfigFrame->UpdateGUI(); - // Only allow one open at a time - if (!m_BasicConfigFrame->IsShown()) - { - g_FrameOpen = true; - m_BasicConfigFrame->ShowModal(); - } - else - { - g_FrameOpen = false; - m_BasicConfigFrame->Hide(); - } + m_BasicConfigFrame = new WiimoteBasicConfigDialog(GetParentedWxWindow(_hParent)); + g_FrameOpen = true; + m_BasicConfigFrame->ShowModal(); + m_BasicConfigFrame->Destroy(); #endif } @@ -261,14 +248,6 @@ void Shutdown(void) // Reset the game ID in all cases g_ISOId = 0; - // We will only shutdown when both a game and the m_ConfigFrame is closed - if (g_FrameOpen) - { - #if defined(HAVE_WX) && HAVE_WX - if(m_BasicConfigFrame) m_BasicConfigFrame->UpdateGUI(); - #endif - } - #if HAVE_WIIUSE if (g_RealWiiMoteInitialized) WiiMoteReal::Shutdown(); #endif