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
This commit is contained in:
sl1nk3.s 2009-09-27 21:28:09 +00:00
parent cad887c51d
commit 56b8b6493c
11 changed files with 186 additions and 140 deletions

View File

@ -24,7 +24,7 @@
#include "DebuggerUIUtil.h" #include "DebuggerUIUtil.h"
#include "DebugInterface.h" #include "DebugInterface.h"
// #include "Host.h" #include "Host.h"
#include "CodeView.h" #include "CodeView.h"
#include "SymbolDB.h" #include "SymbolDB.h"
// #include "JitWindow.h" // #include "JitWindow.h"
@ -125,7 +125,7 @@ void CCodeView::OnMouseDown(wxMouseEvent& event)
{ {
debugger->toggleBreakpoint(YToAddress(y)); debugger->toggleBreakpoint(YToAddress(y));
redraw(); redraw();
// Host_UpdateBreakPointView(); Host_UpdateBreakPointView();
} }
event.Skip(true); event.Skip(true);
@ -311,7 +311,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
case IDM_ADDFUNCTION: case IDM_ADDFUNCTION:
{ {
symbol_db->AddFunction(selection); symbol_db->AddFunction(selection);
// Host_NotifyMapLoaded(); Host_NotifyMapLoaded();
} }
break; break;
@ -323,9 +323,9 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
wxString::FromAscii(symbol->name.c_str())); wxString::FromAscii(symbol->name.c_str()));
if (input_symbol.ShowModal() == wxID_OK) { if (input_symbol.ShowModal() == wxID_OK) {
symbol->name = input_symbol.GetValue().mb_str(); symbol->name = input_symbol.GetValue().mb_str();
redraw(); // Redraw to show the renamed symbol
} }
// redraw(); Host_NotifyMapLoaded();
// Host_NotifyMapLoaded();
} }
} }
break; break;

View File

@ -23,7 +23,6 @@
#include <wx/wx.h> #include <wx/wx.h>
// #include "Debugger.h"
#include "Common.h" #include "Common.h"
#include <vector> #include <vector>

View File

@ -17,6 +17,9 @@
#include "DebuggerUIUtil.h" #include "DebuggerUIUtil.h"
#include "Common.h" #include "Common.h"
#include "Host.h"
#include "PowerPC/PowerPC.h"
#include "HW/Memmap.h"
#include "MemoryView.h" #include "MemoryView.h"
#include <wx/event.h> #include <wx/event.h>
@ -102,8 +105,27 @@ void CMemoryView::OnMouseDown(wxMouseEvent& event)
} }
else 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(); redraw();
Host_UpdateBreakPointView();
} }
event.Skip(true); event.Skip(true);
@ -233,7 +255,7 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
wxBrush currentBrush(_T("#FFEfE8")); // light gray wxBrush currentBrush(_T("#FFEfE8")); // light gray
wxBrush pcBrush(_T("#70FF70")); // green wxBrush pcBrush(_T("#70FF70")); // green
wxBrush bpBrush(_T("#FF3311")); // red wxBrush mcBrush(_T("#1133FF")); // blue
wxBrush bgBrush(bgColor); wxBrush bgBrush(bgColor);
wxBrush nullBrush(bgColor); wxBrush nullBrush(bgColor);
nullBrush.SetStyle(wxTRANSPARENT); nullBrush.SetStyle(wxTRANSPARENT);
@ -308,6 +330,13 @@ void CMemoryView::OnPaint(wxPaintEvent& event)
{ {
dc.DrawText(wxString::FromAscii(desc), 17+fontSize*(8+8+8+30), rowY1); 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);
}
} }
} }

View File

@ -16,16 +16,21 @@
// http://code.google.com/p/dolphin-emu/ // http://code.google.com/p/dolphin-emu/
#include "Debugger.h" #include "Debugger.h"
#include "Common.h"
#include "BreakpointView.h" #include "BreakpointView.h"
#include "Debugger/Debugger_SymbolMap.h" #include "Debugger/Debugger_SymbolMap.h"
#include "PowerPC/PPCSymbolDB.h" #include "PowerPC/PPCSymbolDB.h"
#include "PowerPC/PowerPC.h" #include "PowerPC/PowerPC.h"
#include "HW/Memmap.h"
BEGIN_EVENT_TABLE(CBreakPointView, wxListCtrl) #include <wx/mstream.h>
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) CBreakPointView::CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: wxListCtrl(parent, id, pos, size, style) : wxListCtrl(parent, id, pos, size, style)
@ -120,3 +125,46 @@ void CBreakPointView::DeleteCurrentSelection()
Update(); 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);
}
}

View File

@ -21,6 +21,7 @@
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include "Common.h" #include "Common.h"
#include "BreakpointWindow.h"
class CBreakPointView class CBreakPointView
: public wxListCtrl : public wxListCtrl
@ -30,12 +31,31 @@ class CBreakPointView
CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style); CBreakPointView(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
void Update(); void Update();
void DeleteCurrentSelection(); void DeleteCurrentSelection();
};
class CBreakPointBar
: public wxListCtrl
{
public:
CBreakPointBar(CBreakPointWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size, long style);
void PopulateBar();
private: 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 #endif

View File

@ -16,7 +16,6 @@
// http://code.google.com/p/dolphin-emu/ // http://code.google.com/p/dolphin-emu/
#include "Debugger.h" #include "Debugger.h"
#include "BreakpointWindow.h"
#include "BreakpointView.h" #include "BreakpointView.h"
#include "CodeWindow.h" #include "CodeWindow.h"
#include "HW/Memmap.h" #include "HW/Memmap.h"
@ -25,23 +24,11 @@
#include "Host.h" #include "Host.h"
#include "PowerPC/PowerPC.h" #include "PowerPC/PowerPC.h"
#include <wx/mstream.h>
extern "C" {
#include "../resources/toolbar_add_breakpoint.c"
#include "../resources/toolbar_add_memorycheck.c"
#include "../resources/toolbar_delete.c"
}
BEGIN_EVENT_TABLE(CBreakPointWindow, wxPanel) BEGIN_EVENT_TABLE(CBreakPointWindow, wxPanel)
EVT_CLOSE(CBreakPointWindow::OnClose) 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() END_EVENT_TABLE()
CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style) 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_BreakPointListView(NULL)
, m_pCodeWindow(_pCodeWindow) , m_pCodeWindow(_pCodeWindow)
{ {
InitBitmaps();
CreateGUIControls(); CreateGUIControls();
// Create the toolbar
RecreateToolbar();
} }
void CBreakPointWindow::CreateGUIControls() void CBreakPointWindow::CreateGUIControls()
{ {
// SetTitle(wxT("Breakpoints"));
// SetIcon(wxNullIcon);
SetSize(8, 8, 400, 370); SetSize(8, 8, 400, 370);
Center(); 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); 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(); NotifyUpdate();
SetSizer(sizerH);
} }
void CBreakPointWindow::PopulateToolbar(wxToolBar* toolBar) void CBreakPointWindow::OnSelectItem(wxListEvent& event)
{ {
int w = m_Bitmaps[Toolbar_Delete].GetWidth(), switch(event.GetItem().GetId())
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...")); case IDM_DELETE:
toolBar->AddTool(IDM_ADD_MEMORYCHECKMANY, _T("MCs"), m_Bitmaps[Toolbar_Add_Memcheck], _T("Add MemoryChecks...")); OnDelete();
} m_BreakPointBar->SetItemState(event.GetItem().GetId(), 0, wxLIST_STATE_FOCUSED);
break;
// after adding the buttons to the toolbar, must call Realize() to reflect case IDM_CLEAR:
// the changes OnClear();
toolBar->Realize(); m_BreakPointBar->SetItemState(event.GetItem().GetId(), 0, wxLIST_STATE_FOCUSED);
} break;
case IDM_ADD_BREAKPOINT:
void CBreakPointWindow::RecreateToolbar() OnAddBreakPoint();
{ break;
// FIXME: what do we do with this? case IDM_ADD_BREAKPOINTMANY:
// delete and recreate the toolbar OnAddBreakPointMany();
// wxToolBarBase* toolBar = GetToolBar(); break;
// long style = toolBar ? toolBar->GetWindowStyle() : wxTB_FLAT | wxTB_DOCKABLE | wxTB_TEXT; case IDM_ADD_MEMORYCHECK:
OnAddMemoryCheck();
// delete toolBar; break;
// SetToolBar(NULL); case IDM_ADD_MEMORYCHECKMANY:
OnAddMemoryCheckMany();
// style &= ~(wxTB_HORIZONTAL | wxTB_VERTICAL | wxTB_BOTTOM | wxTB_RIGHT | wxTB_HORZ_LAYOUT | wxTB_TOP); break;
// 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++)
{
m_Bitmaps[n] = wxBitmap(m_Bitmaps[n].ConvertToImage().Scale(16, 16));
} }
} }
@ -137,7 +94,7 @@ void CBreakPointWindow::NotifyUpdate()
if (m_BreakPointListView != NULL) m_BreakPointListView->Update(); if (m_BreakPointListView != NULL) m_BreakPointListView->Update();
} }
void CBreakPointWindow::OnDelete(wxCommandEvent& event) void CBreakPointWindow::OnDelete()
{ {
if (m_BreakPointListView) if (m_BreakPointListView)
{ {
@ -163,19 +120,20 @@ void CBreakPointWindow::OnActivated(wxListEvent& event)
// --------------------- // ---------------------
// Clear all breakpoints // Clear all breakpoints
void CBreakPointWindow::OnClear(wxCommandEvent& event) void CBreakPointWindow::OnClear()
{ {
PowerPC::breakpoints.Clear(); PowerPC::breakpoints.Clear();
PowerPC::memchecks.Clear();
NotifyUpdate(); NotifyUpdate();
} }
// Add one breakpoint // Add one breakpoint
void CBreakPointWindow::OnAddBreakPoint(wxCommandEvent& event) void CBreakPointWindow::OnAddBreakPoint()
{ {
BreakPointDlg bpDlg(this, this); BreakPointDlg bpDlg(this, this);
bpDlg.ShowModal(); bpDlg.ShowModal();
} }
// Load breakpoints from file // Load breakpoints from file
void CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event) void CBreakPointWindow::OnAddBreakPointMany()
{ {
// load ini // load ini
IniFile ini; IniFile ini;
@ -211,19 +169,17 @@ void CBreakPointWindow::OnAddBreakPointMany(wxCommandEvent& event)
} }
// Memory check actions // Memory check actions
// --------------------- // ---------------------
void void
CBreakPointWindow::OnAddMemoryCheck(wxCommandEvent& event) CBreakPointWindow::OnAddMemoryCheck()
{ {
MemoryCheckDlg memDlg(this); MemoryCheckDlg memDlg(this);
memDlg.ShowModal(); memDlg.ShowModal();
} }
// Load memory checks from file // Load memory checks from file
void CBreakPointWindow::OnAddMemoryCheckMany(wxCommandEvent& event) void CBreakPointWindow::OnAddMemoryCheckMany()
{ {
// load ini // load ini
IniFile ini; IniFile ini;

View File

@ -18,11 +18,24 @@
#ifndef __BREAKPOINTWINDOW_h__ #ifndef __BREAKPOINTWINDOW_h__
#define __BREAKPOINTWINDOW_h__ #define __BREAKPOINTWINDOW_h__
#include <wx/listctrl.h>
class CBreakPointView; class CBreakPointView;
class CBreakPointBar;
class CCodeWindow; class CCodeWindow;
class wxListEvent; class wxListEvent;
class IniFile; class IniFile;
enum
{
IDM_DELETE = 0,
IDM_CLEAR,
IDM_ADD_BREAKPOINT,
IDM_ADD_BREAKPOINTMANY,
IDM_ADD_MEMORYCHECK,
IDM_ADD_MEMORYCHECKMANY
};
class CBreakPointWindow class CBreakPointWindow
: public wxPanel : public wxPanel
{ {
@ -37,6 +50,12 @@ class CBreakPointWindow
long style = wxNO_BORDER); long style = wxNO_BORDER);
void NotifyUpdate(); void NotifyUpdate();
void OnDelete();
void OnClear();
void OnAddBreakPoint();
void OnAddBreakPointMany();
void OnAddMemoryCheck();
void OnAddMemoryCheckMany();
private: private:
@ -44,40 +63,19 @@ class CBreakPointWindow
{ {
ID_TOOLBAR = 501, ID_TOOLBAR = 501,
ID_BPS = 1002, 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; CBreakPointView* m_BreakPointListView;
CCodeWindow* m_pCodeWindow; CCodeWindow* m_pCodeWindow;
wxBitmap m_Bitmaps[Bitmaps_max]; // void RecreateToolbar();
// void PopulateToolbar(wxToolBar* toolBar);
void OnClose(wxCloseEvent& event); // void InitBitmaps();
void CreateGUIControls(); void CreateGUIControls();
void RecreateToolbar(); void OnSelectItem(wxListEvent& event);
void PopulateToolbar(wxToolBar* toolBar); void OnClose(wxCloseEvent& event);
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 OnActivated(wxListEvent& event); void OnActivated(wxListEvent& event);
}; };

View File

@ -142,7 +142,7 @@ EVT_LISTBOX(ID_CALLSTACKLIST, CCodeWindow::OnCallstackListChange)
EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange) EVT_LISTBOX(ID_CALLERSLIST, CCodeWindow::OnCallersListChange)
EVT_LISTBOX(ID_CALLSLIST, CCodeWindow::OnCallsListChange) 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) //EVT_COMMAND(ID_CODEVIEW, wxEVT_CODEVIEW_CHANGE, CCodeWindow::OnCodeViewChange)

View File

@ -223,10 +223,6 @@ void CGameListCtrl::Update()
// Don't load bitmaps unless there are games to list // Don't load bitmaps unless there are games to list
InitBitmaps(); InitBitmaps();
// this is needed to get the correct column width on startup
// This way, we avoid the dumb horizontal scrollbar
Show();
// add columns // add columns
InsertColumn(COLUMN_PLATFORM, _("")); InsertColumn(COLUMN_PLATFORM, _(""));
InsertColumn(COLUMN_BANNER, _("Banner")); InsertColumn(COLUMN_BANNER, _("Banner"));
@ -235,7 +231,7 @@ void CGameListCtrl::Update()
InsertColumn(COLUMN_NOTES, _("Notes")); InsertColumn(COLUMN_NOTES, _("Notes"));
InsertColumn(COLUMN_COUNTRY, _("")); InsertColumn(COLUMN_COUNTRY, _(""));
InsertColumn(COLUMN_SIZE, _("Size")); InsertColumn(COLUMN_SIZE, _("Size"));
InsertColumn(COLUMN_EMULATION_STATE, _("Emulation")); InsertColumn(COLUMN_EMULATION_STATE, _("State"));
// set initial sizes for columns // set initial sizes for columns
@ -247,8 +243,6 @@ void CGameListCtrl::Update()
SetColumnWidth(COLUMN_COUNTRY, 32); SetColumnWidth(COLUMN_COUNTRY, 32);
SetColumnWidth(COLUMN_EMULATION_STATE, 50); SetColumnWidth(COLUMN_EMULATION_STATE, 50);
Hide();
// add all items // add all items
for (int i = 0; i < (int)m_ISOFiles.size(); i++) for (int i = 0; i < (int)m_ISOFiles.size(); i++)
{ {
@ -742,10 +736,7 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event)
int nState; int nState;
ini.Get("EmuState", "EmulationStateId", &nState); ini.Get("EmuState", "EmulationStateId", &nState);
ini.Get("EmuState", "EmulationIssues", &issues, "No Description"); ini.Get("EmuState", "EmulationIssues", &issues, "");
// If the key exists in the ini but is not set, we still use "No description"
issues = (issues == "" ? "No Description" : issues);
// Get item Coords then convert from wxWindow coord to Screen coord // Get item Coords then convert from wxWindow coord to Screen coord
wxRect Rect; wxRect Rect;
@ -756,13 +747,14 @@ void CGameListCtrl::OnMouseMotion(wxMouseEvent& event)
// Show a tooltip containing the EmuState and the state description // Show a tooltip containing the EmuState and the state description
if (nState > 0 && nState < 6) if (nState > 0 && nState < 6)
toolTip = new wxEmuStateTip(this->GetGrandParent(), wxString::Format(wxT(" ^ %s :\n%s"), toolTip = new wxEmuStateTip(this, wxString::Format(wxT(" ^ %s%s%s"),
wxString::FromAscii(emuState[nState - 1].c_str()), wxString::FromAscii(issues.c_str())), &toolTip); wxString::FromAscii(emuState[nState - 1].c_str()), issues.size() > 0 ? wxT(" :\n") : wxT(""),
wxString::FromAscii(issues.c_str())), &toolTip);
else 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->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; lastItem = item;
} }

View File

@ -501,7 +501,7 @@ void Host_UpdateMainFrame()
wxPostEvent(main_frame->g_pCodeWindow, event); wxPostEvent(main_frame->g_pCodeWindow, event);
} }
} }
// Remove this?
void Host_UpdateBreakPointView() void Host_UpdateBreakPointView()
{ {
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS); wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_UPDATEBREAKPOINTS);

View File

@ -25,6 +25,10 @@
#include "CodeView.h" #include "CodeView.h"
#include "../DSPSymbols.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 // Event table and class
BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxFrame) BEGIN_EVENT_TABLE(DSPDebuggerLLE, wxFrame)
EVT_CLOSE(DSPDebuggerLLE::OnClose) EVT_CLOSE(DSPDebuggerLLE::OnClose)