diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp index 7c48bbcdee..2d55b81ce8 100644 --- a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.cpp @@ -143,11 +143,6 @@ CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter InitBitmaps(); CreateGUIControls(_LocalCoreStartupParameter); - - // Connect keyboard - wxTheApp->Connect(wxID_ANY, wxEVT_KEY_DOWN, - wxKeyEventHandler(CCodeWindow::OnKeyDown), - (wxObject*)0, this); } wxMenuBar *CCodeWindow::GetMenuBar() @@ -163,11 +158,6 @@ wxAuiToolBar *CCodeWindow::GetToolBar() // ---------- // Events -void CCodeWindow::OnKeyDown(wxKeyEvent& event) -{ - event.Skip(); -} - void CCodeWindow::OnHostMessage(wxCommandEvent& event) { switch (event.GetId()) diff --git a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.h b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.h index af499aa6d3..f84cf4f7fe 100644 --- a/Source/Core/DolphinWX/Src/Debugger/CodeWindow.h +++ b/Source/Core/DolphinWX/Src/Debugger/CodeWindow.h @@ -143,7 +143,6 @@ class CCodeWindow void UpdateLists(); void UpdateCallstack(); - void OnKeyDown(wxKeyEvent& event); void InitBitmaps(); void CreateGUIControls(const SCoreStartupParameter& _LocalCoreStartupParameter); diff --git a/Source/Core/DolphinWX/Src/Debugger/JitWindow.cpp b/Source/Core/DolphinWX/Src/Debugger/JitWindow.cpp index 49d3512982..69cee04db5 100644 --- a/Source/Core/DolphinWX/Src/Debugger/JitWindow.cpp +++ b/Source/Core/DolphinWX/Src/Debugger/JitWindow.cpp @@ -38,13 +38,7 @@ #include "StringUtil.h" #include "LogManager.h" -// ugly that this lib included code from the main -#include "../../DolphinWX/Src/Globals.h" - -// TODO: Fix this ugly hack -namespace { -CJitWindow *the_jit_window; -} +#include "../Globals.h" enum { @@ -67,7 +61,6 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name) : wxPanel(parent, id, pos, size, style, name) { - the_jit_window = this; wxBoxSizer* sizerBig = new wxBoxSizer(wxVERTICAL); wxBoxSizer* sizerSplit = new wxBoxSizer(wxHORIZONTAL); sizerSplit->Add(ppc_box = new wxTextCtrl(this, IDM_PPC_BOX, _T("(ppc)"), @@ -97,16 +90,9 @@ void CJitWindow::OnRefresh(wxCommandEvent& /*event*/) { void CJitWindow::ViewAddr(u32 em_address) { - if (the_jit_window) - { - the_jit_window->Show(true); - the_jit_window->Compare(em_address); - the_jit_window->SetFocus(); - } - else - { - PanicAlert("Jit window not available"); - } + Show(true); + Compare(em_address); + SetFocus(); } void CJitWindow::Compare(u32 em_address) diff --git a/Source/Core/DolphinWX/Src/Debugger/JitWindow.h b/Source/Core/DolphinWX/Src/Debugger/JitWindow.h index 468a3e5256..63b50d4e84 100644 --- a/Source/Core/DolphinWX/Src/Debugger/JitWindow.h +++ b/Source/Core/DolphinWX/Src/Debugger/JitWindow.h @@ -48,7 +48,7 @@ public: long style = wxTAB_TRAVERSAL | wxBORDER_NONE, const wxString& name = _("JIT block viewer")); - static void ViewAddr(u32 em_address); + void ViewAddr(u32 em_address); void Update(); private: diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 357050675c..bc761bb36f 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -557,7 +557,8 @@ void Host_UpdateDisasmDialog() void Host_ShowJitResults(unsigned int address) { - CJitWindow::ViewAddr(address); + if (main_frame->g_pCodeWindow && main_frame->g_pCodeWindow->m_JitWindow) + main_frame->g_pCodeWindow->m_JitWindow->ViewAddr(address); } void Host_UpdateMainFrame() diff --git a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp index 5bfad33e73..4021da2eb6 100644 --- a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp +++ b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp @@ -144,7 +144,7 @@ void WiimoteConfigPage::UpdateWiimoteStatus() // Connect wiimotes if (WIIMOTE_SRC_EMU & g_wiimote_sources[m_index]) CFrame::ConnectWiimote(m_index, true); - else if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index]) + else if (WIIMOTE_SRC_REAL & g_wiimote_sources[m_index] && WiimoteReal::g_wiimotes[m_index]) CFrame::ConnectWiimote(m_index, WiimoteReal::g_wiimotes[m_index]->IsConnected()); } }