Make sure configuration can only be opened once

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4949 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st 2010-01-24 15:13:35 +00:00
parent afb82b1d8c
commit 225d691bcc
2 changed files with 16 additions and 12 deletions

View File

@ -623,11 +623,14 @@ void DllConfig(HWND _hParent)
// Show wxDialog
#if defined(HAVE_WX) && HAVE_WX
m_ConfigFrame = new PADConfigDialogSimple(GetParentedWxWindow(_hParent));
m_ConfigFrame->ShowModal();
m_ConfigFrame->Destroy();
delete m_ConfigFrame;
m_ConfigFrame = NULL;
if (!m_ConfigFrame)
{
m_ConfigFrame = new PADConfigDialogSimple(GetParentedWxWindow(_hParent));
m_ConfigFrame->ShowModal();
m_ConfigFrame->Destroy();
delete m_ConfigFrame;
m_ConfigFrame = NULL;
}
#endif
// Save configuration

View File

@ -181,13 +181,14 @@ void DllConfig(HWND _hParent)
}
#if defined(HAVE_WX) && HAVE_WX
m_BasicConfigFrame = new WiimoteBasicConfigDialog(GetParentedWxWindow(_hParent));
m_BasicConfigFrame->ShowModal();
m_BasicConfigFrame->Destroy();
delete m_BasicConfigFrame;
m_BasicConfigFrame = NULL;
if (!m_BasicConfigFrame)
{
m_BasicConfigFrame = new WiimoteBasicConfigDialog(GetParentedWxWindow(_hParent));
m_BasicConfigFrame->ShowModal();
m_BasicConfigFrame->Destroy();
delete m_BasicConfigFrame;
m_BasicConfigFrame = NULL;
}
#endif
}