From 6da7695843829286eb810de04654f2012650701d Mon Sep 17 00:00:00 2001 From: "sl1nk3.s" Date: Thu, 25 Feb 2010 17:50:08 +0000 Subject: [PATCH] Fix issue 2364 + another issue introduced in r5129 causing the main window to lose the focus on windows git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5133 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_DSP_HLE/Src/main.cpp | 6 ++++-- Source/Plugins/Plugin_DSP_LLE/Src/main.cpp | 6 ++++-- Source/Plugins/Plugin_GCPad/Src/GCPad.cpp | 6 ++++-- Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp | 1 - Source/Plugins/Plugin_VideoOGL/Src/main.cpp | 7 +++++-- Source/Plugins/Plugin_Wiimote/Src/main.cpp | 6 ++++-- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp index a8e5fdaf88..613cb4ef87 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/main.cpp @@ -186,11 +186,13 @@ void DllConfig(HWND _hParent) m_ConfigFrame->ShowModal(); frame->Enable(); - m_ConfigFrame->Destroy(); - m_ConfigFrame = NULL; #ifdef _WIN32 + frame->SetFocus(); frame->SetHWND(NULL); #endif + + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; frame->Destroy(); #endif } diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp index 8bd238c954..d97692023a 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/main.cpp @@ -151,11 +151,13 @@ void DllConfig(HWND _hParent) m_ConfigFrame->ShowModal(); frame->Enable(); - m_ConfigFrame->Destroy(); - m_ConfigFrame = NULL; #ifdef _WIN32 + frame->SetFocus(); frame->SetHWND(NULL); #endif + + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; frame->Destroy(); #endif } diff --git a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp index f1482835f6..12662b13d2 100644 --- a/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp +++ b/Source/Plugins/Plugin_GCPad/Src/GCPad.cpp @@ -168,11 +168,13 @@ void DllConfig(HWND _hParent) m_ConfigFrame->ShowModal(); frame->Enable(); - m_ConfigFrame->Destroy(); - m_ConfigFrame = NULL; #ifdef _WIN32 + frame->SetFocus(); frame->SetHWND(NULL); #endif + + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; frame->Destroy(); #endif } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 3cab99ffd4..cee7be70dd 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -86,7 +86,6 @@ END_EVENT_TABLE() GFXConfigDialogOGL::GFXConfigDialogOGL(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style) : wxDialog(parent, id, title, position, size, style) { - CreateGUIControls(); } diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 86ee3c66c7..c77d9f7f4a 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -292,14 +292,17 @@ void DllConfig(HWND _hParent) // Prevent user to show more than 1 config window at same time frame->Disable(); + m_ConfigFrame->CreateGUIControls(); m_ConfigFrame->ShowModal(); frame->Enable(); - m_ConfigFrame->Destroy(); - m_ConfigFrame = NULL; #ifdef _WIN32 + frame->SetFocus(); frame->SetHWND(NULL); #endif + + m_ConfigFrame->Destroy(); + m_ConfigFrame = NULL; frame->Destroy(); #endif } diff --git a/Source/Plugins/Plugin_Wiimote/Src/main.cpp b/Source/Plugins/Plugin_Wiimote/Src/main.cpp index beb2fd7667..d8bd04c29c 100644 --- a/Source/Plugins/Plugin_Wiimote/Src/main.cpp +++ b/Source/Plugins/Plugin_Wiimote/Src/main.cpp @@ -173,11 +173,13 @@ void DllConfig(HWND _hParent) m_BasicConfigFrame->ShowModal(); frame->Enable(); - m_BasicConfigFrame->Destroy(); - m_BasicConfigFrame = NULL; #ifdef _WIN32 + frame->SetFocus(); frame->SetHWND(NULL); #endif + + m_BasicConfigFrame->Destroy(); + m_BasicConfigFrame = NULL; frame->Destroy(); #endif }