From 56b8b6493c91ba29f4ca48714d47a521f66a9851 Mon Sep 17 00:00:00 2001 From: "sl1nk3.s" Date: Sun, 27 Sep 2009 21:28:09 +0000 Subject: [PATCH] Debugger : fixed Breakpoint "toolbar", re-enabled a couple of host messages for dialog updates and other stuff, breakpoints in memory view are now memory checks instead of PPC breakpoints git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4337 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerUICommon/Src/CodeView.cpp | 10 +- Source/Core/DebuggerUICommon/Src/CodeView.h | 1 - .../Core/DebuggerUICommon/Src/MemoryView.cpp | 33 ++++- Source/Core/DebuggerWX/Src/BreakpointView.cpp | 54 +++++++- Source/Core/DebuggerWX/Src/BreakpointView.h | 24 +++- .../Core/DebuggerWX/Src/BreakpointWindow.cpp | 122 ++++++------------ Source/Core/DebuggerWX/Src/BreakpointWindow.h | 52 ++++---- Source/Core/DebuggerWX/Src/CodeWindow.cpp | 2 +- Source/Core/DolphinWX/Src/GameListCtrl.cpp | 22 +--- Source/Core/DolphinWX/Src/Main.cpp | 2 +- .../Src/Debugger/DSPDebugWindow.cpp | 4 + 11 files changed, 186 insertions(+), 140 deletions(-) diff --git a/Source/Core/DebuggerUICommon/Src/CodeView.cpp b/Source/Core/DebuggerUICommon/Src/CodeView.cpp index ad7d0780ec..830ec13fa8 100644 --- a/Source/Core/DebuggerUICommon/Src/CodeView.cpp +++ b/Source/Core/DebuggerUICommon/Src/CodeView.cpp @@ -24,7 +24,7 @@ #include "DebuggerUIUtil.h" #include "DebugInterface.h" -// #include "Host.h" +#include "Host.h" #include "CodeView.h" #include "SymbolDB.h" // #include "JitWindow.h" @@ -125,7 +125,7 @@ void CCodeView::OnMouseDown(wxMouseEvent& event) { debugger->toggleBreakpoint(YToAddress(y)); redraw(); -// Host_UpdateBreakPointView(); + Host_UpdateBreakPointView(); } event.Skip(true); @@ -311,7 +311,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) case IDM_ADDFUNCTION: { symbol_db->AddFunction(selection); -// Host_NotifyMapLoaded(); + Host_NotifyMapLoaded(); } break; @@ -323,9 +323,9 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event) wxString::FromAscii(symbol->name.c_str())); if (input_symbol.ShowModal() == wxID_OK) { symbol->name = input_symbol.GetValue().mb_str(); + redraw(); // Redraw to show the renamed symbol } -// redraw(); -// Host_NotifyMapLoaded(); + Host_NotifyMapLoaded(); } } break; diff --git a/Source/Core/DebuggerUICommon/Src/CodeView.h b/Source/Core/DebuggerUICommon/Src/CodeView.h index 63a7a20088..4ed19988bf 100644 --- a/Source/Core/DebuggerUICommon/Src/CodeView.h +++ b/Source/Core/DebuggerUICommon/Src/CodeView.h @@ -23,7 +23,6 @@ #include -// #include "Debugger.h" #include "Common.h" #include diff --git a/Source/Core/DebuggerUICommon/Src/MemoryView.cpp b/Source/Core/DebuggerUICommon/Src/MemoryView.cpp index 9d555706b7..f918992829 100644 --- a/Source/Core/DebuggerUICommon/Src/MemoryView.cpp +++ b/Source/Core/DebuggerUICommon/Src/MemoryView.cpp @@ -17,6 +17,9 @@ #include "DebuggerUIUtil.h" #include "Common.h" +#include "Host.h" +#include "PowerPC/PowerPC.h" +#include "HW/Memmap.h" #include "MemoryView.h" #include @@ -102,8 +105,27 @@ void CMemoryView::OnMouseDown(wxMouseEvent& event) } else { - debugger->toggleBreakpoint(YToAddress(y)); + int address = YToAddress(y); + if (Memory::AreMemoryBreakpointsActivated() && !PowerPC::memchecks.GetMemCheck(address)) + { + // Add Memory Check + TMemCheck MemCheck; + MemCheck.StartAddress = address; + MemCheck.EndAddress = address; + MemCheck.OnRead = true; + MemCheck.OnWrite = true; + + MemCheck.Log = true; + MemCheck.Break = true; + + PowerPC::memchecks.Add(MemCheck); + + } + else + PowerPC::memchecks.DeleteByAddress(address); + redraw(); + Host_UpdateBreakPointView(); } event.Skip(true); @@ -233,7 +255,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event) wxBrush currentBrush(_T("#FFEfE8")); // light gray wxBrush pcBrush(_T("#70FF70")); // green - wxBrush bpBrush(_T("#FF3311")); // red + wxBrush mcBrush(_T("#1133FF")); // blue wxBrush bgBrush(bgColor); wxBrush nullBrush(bgColor); nullBrush.SetStyle(wxTRANSPARENT); @@ -308,6 +330,13 @@ void CMemoryView::OnPaint(wxPaintEvent& event) { dc.DrawText(wxString::FromAscii(desc), 17+fontSize*(8+8+8+30), rowY1); } + + // Show blue memory check dot + if (Memory::AreMemoryBreakpointsActivated() && PowerPC::memchecks.GetMemCheck(address)) + { + dc.SetBrush(mcBrush); + dc.DrawRectangle(2, rowY1 + 1, 11, 11); + } } } diff --git a/Source/Core/DebuggerWX/Src/BreakpointView.cpp b/Source/Core/DebuggerWX/Src/BreakpointView.cpp index 3c67efd833..e0c1cac2dc 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointView.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointView.cpp @@ -16,16 +16,21 @@ // http://code.google.com/p/dolphin-emu/ #include "Debugger.h" -#include "Common.h" #include "BreakpointView.h" #include "Debugger/Debugger_SymbolMap.h" #include "PowerPC/PPCSymbolDB.h" #include "PowerPC/PowerPC.h" +#include "HW/Memmap.h" -BEGIN_EVENT_TABLE(CBreakPointView, wxListCtrl) +#include + +extern "C" { +#include "../resources/toolbar_add_breakpoint.c" +#include "../resources/toolbar_add_memorycheck.c" +#include "../resources/toolbar_delete.c" +} -END_EVENT_TABLE() CBreakPointView::CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxListCtrl(parent, id, pos, size, style) @@ -120,3 +125,46 @@ void CBreakPointView::DeleteCurrentSelection() Update(); } } + + +CBreakPointBar::CBreakPointBar(CBreakPointWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style) + : wxListCtrl((wxWindow*)parent, id, pos, size, style) +{ + BPWindow = parent; + + SetBackgroundColour(wxColour(0x555555)); + SetForegroundColour(wxColour(0xffffff)); + + // load orignal size 48x48 + wxMemoryInputStream st1(toolbar_delete_png, sizeof(toolbar_delete_png)); + wxMemoryInputStream st2(toolbar_add_breakpoint_png, sizeof(toolbar_add_breakpoint_png)); + wxMemoryInputStream st3(toolbar_add_memcheck_png, sizeof(toolbar_add_memcheck_png)); + m_Bitmaps[Toolbar_Delete] = wxBitmap(wxImage(st1, wxBITMAP_TYPE_ANY, -1).Rescale(24,24), -1); + m_Bitmaps[Toolbar_Add_BP] = wxBitmap(wxImage(st2, wxBITMAP_TYPE_ANY, -1).Rescale(24,24), -1); + m_Bitmaps[Toolbar_Add_MC] = wxBitmap(wxImage(st3, wxBITMAP_TYPE_ANY, -1).Rescale(24,24), -1); + + m_imageListNormal = new wxImageList(24, 24); + m_imageListNormal->Add(m_Bitmaps[Toolbar_Delete]); + m_imageListNormal->Add(m_Bitmaps[Toolbar_Add_BP]); + m_imageListNormal->Add(m_Bitmaps[Toolbar_Add_MC]); + SetImageList(m_imageListNormal, wxIMAGE_LIST_NORMAL); + + PopulateBar(); +} + + +void CBreakPointBar::PopulateBar() +{ + long Index = InsertItem(IDM_DELETE, _T("Delete"), 0); + InsertItem(IDM_CLEAR, _T("Clear all"), 0); + + InsertItem(IDM_ADD_BREAKPOINT, _T("Add BP..."), 1); + InsertItem(IDM_ADD_BREAKPOINTMANY, _T("Add BPs..."), 1); + + // just add memory breakpoints if you can use them + if (Memory::AreMemoryBreakpointsActivated()) + { + InsertItem(IDM_ADD_MEMORYCHECK, _T("Add MC..."), 2); + InsertItem(IDM_ADD_MEMORYCHECKMANY, _T("Add MCs..."), 2); + } +} diff --git a/Source/Core/DebuggerWX/Src/BreakpointView.h b/Source/Core/DebuggerWX/Src/BreakpointView.h index 34e9bf308c..bc692bd0cd 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointView.h +++ b/Source/Core/DebuggerWX/Src/BreakpointView.h @@ -21,6 +21,7 @@ #include #include "Common.h" +#include "BreakpointWindow.h" class CBreakPointView : public wxListCtrl @@ -30,12 +31,31 @@ class CBreakPointView CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style); void Update(); - void DeleteCurrentSelection(); +}; + +class CBreakPointBar + : public wxListCtrl +{ + public: + + CBreakPointBar(CBreakPointWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style); + + void PopulateBar(); private: + void OnSelectItem(wxListEvent& event); - DECLARE_EVENT_TABLE() + enum + { + Toolbar_Delete, + Toolbar_Add_BP, + Toolbar_Add_MC, + Bitmaps_max + }; + + CBreakPointWindow* BPWindow; + wxBitmap m_Bitmaps[Bitmaps_max]; }; #endif diff --git a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp index 228bc60568..b6db6c54bd 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp +++ b/Source/Core/DebuggerWX/Src/BreakpointWindow.cpp @@ -16,7 +16,6 @@ // http://code.google.com/p/dolphin-emu/ #include "Debugger.h" -#include "BreakpointWindow.h" #include "BreakpointView.h" #include "CodeWindow.h" #include "HW/Memmap.h" @@ -25,23 +24,11 @@ #include "Host.h" #include "PowerPC/PowerPC.h" -#include - -extern "C" { -#include "../resources/toolbar_add_breakpoint.c" -#include "../resources/toolbar_add_memorycheck.c" -#include "../resources/toolbar_delete.c" -} BEGIN_EVENT_TABLE(CBreakPointWindow, wxPanel) EVT_CLOSE(CBreakPointWindow::OnClose) - EVT_MENU(IDM_DELETE, CBreakPointWindow::OnDelete) - EVT_MENU(IDM_CLEAR, CBreakPointWindow::OnClear) - EVT_MENU(IDM_ADD_BREAKPOINT, CBreakPointWindow::OnAddBreakPoint) - EVT_MENU(IDM_ADD_BREAKPOINTMANY, CBreakPointWindow::OnAddBreakPointMany) - EVT_MENU(IDM_ADD_MEMORYCHECK, CBreakPointWindow::OnAddMemoryCheck) - EVT_MENU(IDM_ADD_MEMORYCHECKMANY, CBreakPointWindow::OnAddMemoryCheckMany) - EVT_LIST_ITEM_ACTIVATED(ID_BPS, CBreakPointWindow::OnActivated) + EVT_LIST_ITEM_ACTIVATED(ID_BPS, CBreakPointWindow::OnActivated) + EVT_LIST_ITEM_SELECTED(ID_TOOLBAR, CBreakPointWindow::OnSelectItem) END_EVENT_TABLE() CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style) @@ -49,81 +36,51 @@ CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent , m_BreakPointListView(NULL) , m_pCodeWindow(_pCodeWindow) { - InitBitmaps(); - CreateGUIControls(); - - // Create the toolbar - RecreateToolbar(); } void CBreakPointWindow::CreateGUIControls() { - // SetTitle(wxT("Breakpoints")); - // SetIcon(wxNullIcon); SetSize(8, 8, 400, 370); Center(); - m_BreakPointListView = new CBreakPointView(this, ID_BPS, wxDefaultPosition, GetSize(), + m_BreakPointBar = new CBreakPointBar(this, ID_TOOLBAR, wxDefaultPosition, wxSize(0, 55), + wxLC_ICON | wxSUNKEN_BORDER | wxLC_SINGLE_SEL); + m_BreakPointListView = new CBreakPointView(this, ID_BPS, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT | wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING); + wxBoxSizer* sizerH = new wxBoxSizer(wxVERTICAL); + sizerH->Add(m_BreakPointBar, 0, wxALL | wxEXPAND); + sizerH->Add((wxListCtrl*)m_BreakPointListView, 1, wxEXPAND); + NotifyUpdate(); + SetSizer(sizerH); } -void CBreakPointWindow::PopulateToolbar(wxToolBar* toolBar) +void CBreakPointWindow::OnSelectItem(wxListEvent& event) { - int w = m_Bitmaps[Toolbar_Delete].GetWidth(), - h = m_Bitmaps[Toolbar_Delete].GetHeight(); - - toolBar->SetToolBitmapSize(wxSize(w, h)); - toolBar->AddTool(IDM_DELETE, _T("Delete"), m_Bitmaps[Toolbar_Delete], _T("Delete the selected BreakPoint or MemoryCheck")); - toolBar->AddTool(IDM_CLEAR, _T("Clear all"), m_Bitmaps[Toolbar_Delete], _T("Clear all BreakPoints and MemoryChecks")); - - toolBar->AddSeparator(); - - toolBar->AddTool(IDM_ADD_BREAKPOINT, _T("BP"), m_Bitmaps[Toolbar_Add_BreakPoint], _T("Add BreakPoint...")); - toolBar->AddTool(IDM_ADD_BREAKPOINTMANY, _T("BPs"), m_Bitmaps[Toolbar_Add_BreakPoint], _T("Add BreakPoints...")); - - // just add memory breakpoints if you can use them - if (Memory::AreMemoryBreakpointsActivated()) - { - toolBar->AddTool(IDM_ADD_MEMORYCHECK, _T("MC"), m_Bitmaps[Toolbar_Add_Memcheck], _T("Add MemoryCheck...")); - toolBar->AddTool(IDM_ADD_MEMORYCHECKMANY, _T("MCs"), m_Bitmaps[Toolbar_Add_Memcheck], _T("Add MemoryChecks...")); - } - - // after adding the buttons to the toolbar, must call Realize() to reflect - // the changes - toolBar->Realize(); -} - -void CBreakPointWindow::RecreateToolbar() -{ - // FIXME: what do we do with this? - // delete and recreate the toolbar - // wxToolBarBase* toolBar = GetToolBar(); - // long style = toolBar ? toolBar->GetWindowStyle() : wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT; - - // delete toolBar; - // SetToolBar(NULL); - - // style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP); - // wxToolBar* theToolBar = CreateToolBar(style, ID_TOOLBAR); - - // PopulateToolbar(theToolBar); - // SetToolBar(theToolBar); -} - -void CBreakPointWindow::InitBitmaps() -{ - // load orignal size 48x48 - m_Bitmaps[Toolbar_Delete] = wxGetBitmapFromMemory(toolbar_delete_png); - m_Bitmaps[Toolbar_Add_BreakPoint] = wxGetBitmapFromMemory(toolbar_add_breakpoint_png); - m_Bitmaps[Toolbar_Add_Memcheck] = wxGetBitmapFromMemory(toolbar_add_memcheck_png); - - // scale to 24x24 for toolbar - for (size_t n = Toolbar_Delete; n < WXSIZEOF(m_Bitmaps); n++) + switch(event.GetItem().GetId()) { - m_Bitmaps[n] = wxBitmap(m_Bitmaps[n].ConvertToImage().Scale(16, 16)); + case IDM_DELETE: + OnDelete(); + m_BreakPointBar->SetItemState(event.GetItem().GetId(), 0, wxLIST_STATE_FOCUSED); + break; + case IDM_CLEAR: + OnClear(); + m_BreakPointBar->SetItemState(event.GetItem().GetId(), 0, wxLIST_STATE_FOCUSED); + break; + case IDM_ADD_BREAKPOINT: + OnAddBreakPoint(); + break; + case IDM_ADD_BREAKPOINTMANY: + OnAddBreakPointMany(); + break; + case IDM_ADD_MEMORYCHECK: + OnAddMemoryCheck(); + break; + case IDM_ADD_MEMORYCHECKMANY: + OnAddMemoryCheckMany(); + break; } } @@ -137,7 +94,7 @@ void CBreakPointWindow::NotifyUpdate() if (m_BreakPointListView != NULL) m_BreakPointListView->Update(); } -void CBreakPointWindow::OnDelete(wxCommandEvent& event) +void CBreakPointWindow::OnDelete() { if (m_BreakPointListView) { @@ -163,19 +120,20 @@ void CBreakPointWindow::OnActivated(wxListEvent& event) // --------------------- // Clear all breakpoints -void CBreakPointWindow::OnClear(wxCommandEvent& event) +void CBreakPointWindow::OnClear() { PowerPC::breakpoints.Clear(); + PowerPC::memchecks.Clear(); NotifyUpdate(); } // Add one breakpoint -void CBreakPointWindow::OnAddBreakPoint(wxCommandEvent& event) +void CBreakPointWindow::OnAddBreakPoint() { BreakPointDlg bpDlg(this, this); bpDlg.ShowModal(); } // Load breakpoints from file -void CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event) +void CBreakPointWindow::OnAddBreakPointMany() { // load ini IniFile ini; @@ -211,19 +169,17 @@ void CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event) } - - // Memory check actions // --------------------- void -CBreakPointWindow::OnAddMemoryCheck(wxCommandEvent& event) +CBreakPointWindow::OnAddMemoryCheck() { MemoryCheckDlg memDlg(this); memDlg.ShowModal(); } // Load memory checks from file -void CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event) +void CBreakPointWindow::OnAddMemoryCheckMany() { // load ini IniFile ini; diff --git a/Source/Core/DebuggerWX/Src/BreakpointWindow.h b/Source/Core/DebuggerWX/Src/BreakpointWindow.h index 1c8c444d2e..dcc00d42d6 100644 --- a/Source/Core/DebuggerWX/Src/BreakpointWindow.h +++ b/Source/Core/DebuggerWX/Src/BreakpointWindow.h @@ -18,11 +18,24 @@ #ifndef __BREAKPOINTWINDOW_h__ #define __BREAKPOINTWINDOW_h__ +#include + class CBreakPointView; +class CBreakPointBar; class CCodeWindow; class wxListEvent; class IniFile; +enum +{ + IDM_DELETE = 0, + IDM_CLEAR, + IDM_ADD_BREAKPOINT, + IDM_ADD_BREAKPOINTMANY, + IDM_ADD_MEMORYCHECK, + IDM_ADD_MEMORYCHECKMANY +}; + class CBreakPointWindow : public wxPanel { @@ -37,6 +50,12 @@ class CBreakPointWindow long style = wxNO_BORDER); void NotifyUpdate(); + void OnDelete(); + void OnClear(); + void OnAddBreakPoint(); + void OnAddBreakPointMany(); + void OnAddMemoryCheck(); + void OnAddMemoryCheckMany(); private: @@ -44,40 +63,19 @@ class CBreakPointWindow { ID_TOOLBAR = 501, ID_BPS = 1002, - IDM_DELETE, - IDM_CLEAR, - IDM_ADD_BREAKPOINT, - IDM_ADD_BREAKPOINTMANY, - IDM_ADD_MEMORYCHECK, - IDM_ADD_MEMORYCHECKMANY - }; - - enum - { - Toolbar_Delete, - Toolbar_Add_BreakPoint, - Toolbar_Add_Memcheck, - Bitmaps_max }; + CBreakPointBar* m_BreakPointBar; CBreakPointView* m_BreakPointListView; CCodeWindow* m_pCodeWindow; - wxBitmap m_Bitmaps[Bitmaps_max]; - - void OnClose(wxCloseEvent& event); + // void RecreateToolbar(); + // void PopulateToolbar(wxToolBar* toolBar); + // void InitBitmaps(); void CreateGUIControls(); - void RecreateToolbar(); - void PopulateToolbar(wxToolBar* toolBar); - void InitBitmaps(); - - void OnDelete(wxCommandEvent& event); - void OnClear(wxCommandEvent& event); - void OnAddBreakPoint(wxCommandEvent& event); - void OnAddBreakPointMany(wxCommandEvent& event); - void OnAddMemoryCheck(wxCommandEvent& event); - void OnAddMemoryCheckMany(wxCommandEvent& event); + void OnSelectItem(wxListEvent& event); + void OnClose(wxCloseEvent& event); void OnActivated(wxListEvent& event); }; diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index dd024659aa..dadc22fafb 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -142,7 +142,7 @@ EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange) EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange) EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange) -//EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage) +EVT_HOST_COMMAND(wxID_ANY, CCodeWindow::OnHostMessage) //EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange) diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index dc197ce3e9..e51fd12a02 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -223,10 +223,6 @@ void CGameListCtrl::Update() // Don't load bitmaps unless there are games to list InitBitmaps(); - // this is needed to get the correct column width on startup - // This way, we avoid the dumb horizontal scrollbar - Show(); - // add columns InsertColumn(COLUMN_PLATFORM, _("")); InsertColumn(COLUMN_BANNER, _("Banner")); @@ -235,7 +231,7 @@ void CGameListCtrl::Update() InsertColumn(COLUMN_NOTES, _("Notes")); InsertColumn(COLUMN_COUNTRY, _("")); InsertColumn(COLUMN_SIZE, _("Size")); - InsertColumn(COLUMN_EMULATION_STATE, _("Emulation")); + InsertColumn(COLUMN_EMULATION_STATE, _("State")); // set initial sizes for columns @@ -247,8 +243,6 @@ void CGameListCtrl::Update() SetColumnWidth(COLUMN_COUNTRY, 32); SetColumnWidth(COLUMN_EMULATION_STATE, 50); - Hide(); - // add all items for (int i = 0; i < (int)m_ISOFiles.size(); i++) { @@ -742,10 +736,7 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event) int nState; ini.Get("EmuState", "EmulationStateId", &nState); - ini.Get("EmuState", "EmulationIssues", &issues, "No Description"); - - // If the key exists in the ini but is not set, we still use "No description" - issues = (issues == "" ? "No Description" : issues); + ini.Get("EmuState", "EmulationIssues", &issues, ""); // Get item Coords then convert from wxWindow coord to Screen coord wxRect Rect; @@ -756,13 +747,14 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event) // Show a tooltip containing the EmuState and the state description if (nState > 0 && nState < 6) - toolTip = new wxEmuStateTip(this->GetGrandParent(), wxString::Format(wxT(" ^ %s :\n%s"), - wxString::FromAscii(emuState[nState - 1].c_str()), wxString::FromAscii(issues.c_str())), &toolTip); + toolTip = new wxEmuStateTip(this, wxString::Format(wxT(" ^ %s%s%s"), + wxString::FromAscii(emuState[nState - 1].c_str()), issues.size() > 0 ? wxT(" :\n") : wxT(""), + wxString::FromAscii(issues.c_str())), &toolTip); else - toolTip = new wxEmuStateTip(this->GetGrandParent(), wxT("Not Set"), &toolTip); + toolTip = new wxEmuStateTip(this, wxT("Not Set"), &toolTip); toolTip->SetBoundingRect(wxRect(mx - GetColumnWidth(subitem), my, GetColumnWidth(subitem), Rect.GetHeight())); - toolTip->SetPosition(wxPoint(mx - GetColumnWidth(subitem), my - 10 + Rect.GetHeight())); + toolTip->SetPosition(wxPoint(mx - GetColumnWidth(subitem), my - 5 + Rect.GetHeight())); lastItem = item; } diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 6baec96c73..d92f3842e7 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -501,7 +501,7 @@ void Host_UpdateMainFrame() wxPostEvent(main_frame->g_pCodeWindow, event); } } -// Remove this? + void Host_UpdateBreakPointView() { wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp index aea9a35160..c495baccc2 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Debugger/DSPDebugWindow.cpp @@ -25,6 +25,10 @@ #include "CodeView.h" #include "../DSPSymbols.h" +// Define these here to avoid undefined symbols while still saving functionality +void Host_NotifyMapLoaded() {} +void Host_UpdateBreakPointView() {} + // Event table and class BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxFrame) EVT_CLOSE(DSPDebuggerLLE::OnClose)