mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
WX: HiDPI: FrameAUI / Debugger
Changes:
- MemoryWindow was cleaned up and gives more feedback on searches.
Some bugs were fixed as well:
- A complex bug that allowed tearing off tabs and opening multiple
copies of a debug panel which lead to segfaults
- Another segfault related to right-click menus on code/memory views
when those tools were floating in their own window.
This commit is contained in:
@@ -23,11 +23,15 @@ BreakPointDlg::BreakPointDlg(CBreakPointWindow* _Parent)
|
||||
|
||||
m_pEditAddress = new wxTextCtrl(this, wxID_ANY, "80000000");
|
||||
|
||||
wxBoxSizer* sMainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
sMainSizer->Add(m_pEditAddress, 0, wxEXPAND | wxALL, 5);
|
||||
sMainSizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALL, 5);
|
||||
const int space5 = FromDIP(5);
|
||||
wxBoxSizer* main_szr = new wxBoxSizer(wxVERTICAL);
|
||||
main_szr->AddSpacer(space5);
|
||||
main_szr->Add(m_pEditAddress, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
main_szr->AddSpacer(space5);
|
||||
main_szr->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
main_szr->AddSpacer(space5);
|
||||
|
||||
SetSizerAndFit(sMainSizer);
|
||||
SetSizerAndFit(main_szr);
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ CBreakPointView::CBreakPointView(wxWindow* parent, const wxWindowID id)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
void CBreakPointView::Update()
|
||||
void CBreakPointView::Repopulate()
|
||||
{
|
||||
ClearAll();
|
||||
|
||||
@@ -98,6 +98,6 @@ void CBreakPointView::DeleteCurrentSelection()
|
||||
u32 Address = (u32)GetItemData(item);
|
||||
PowerPC::breakpoints.Remove(Address);
|
||||
PowerPC::memchecks.Remove(Address);
|
||||
Update();
|
||||
Repopulate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,6 @@ class CBreakPointView : public wxListCtrl
|
||||
public:
|
||||
CBreakPointView(wxWindow* parent, const wxWindowID id);
|
||||
|
||||
void Update() override;
|
||||
void Repopulate();
|
||||
void DeleteCurrentSelection();
|
||||
};
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
// Licensed under GPLv2+
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <array>
|
||||
|
||||
// clang-format off
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/aui/framemanager.h>
|
||||
@@ -32,11 +34,15 @@ public:
|
||||
: DolphinAuiToolBar(parent, id, wxDefaultPosition, wxDefaultSize,
|
||||
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_TEXT)
|
||||
{
|
||||
SetToolBitmapSize(wxSize(24, 24));
|
||||
wxSize bitmap_size = FromDIP(wxSize(24, 24));
|
||||
SetToolBitmapSize(bitmap_size);
|
||||
|
||||
m_Bitmaps[Toolbar_Delete] = WxUtils::LoadResourceBitmap("toolbar_debugger_delete");
|
||||
m_Bitmaps[Toolbar_Add_BP] = WxUtils::LoadResourceBitmap("toolbar_add_breakpoint");
|
||||
m_Bitmaps[Toolbar_Add_MC] = WxUtils::LoadResourceBitmap("toolbar_add_memorycheck");
|
||||
static const std::array<const char* const, Num_Bitmaps> image_names{
|
||||
{"toolbar_debugger_delete", "toolbar_add_breakpoint", "toolbar_add_memorycheck"}};
|
||||
for (std::size_t i = 0; i < image_names.size(); ++i)
|
||||
m_Bitmaps[i] =
|
||||
WxUtils::LoadScaledResourceBitmap(image_names[i], this, bitmap_size, wxDefaultSize,
|
||||
WxUtils::LSI_SCALE_DOWN | WxUtils::LSI_ALIGN_CENTER);
|
||||
|
||||
AddTool(ID_DELETE, _("Delete"), m_Bitmaps[Toolbar_Delete]);
|
||||
Bind(wxEVT_TOOL, &CBreakPointWindow::OnDelete, parent, ID_DELETE);
|
||||
@@ -84,8 +90,6 @@ CBreakPointWindow::CBreakPointWindow(CCodeWindow* _pCodeWindow, wxWindow* parent
|
||||
const wxSize& size, long style)
|
||||
: wxPanel(parent, id, position, size, style, title), m_pCodeWindow(_pCodeWindow)
|
||||
{
|
||||
Bind(wxEVT_CLOSE_WINDOW, &CBreakPointWindow::OnClose, this);
|
||||
|
||||
m_mgr.SetManagedWindow(this);
|
||||
m_mgr.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
|
||||
|
||||
@@ -108,15 +112,9 @@ CBreakPointWindow::~CBreakPointWindow()
|
||||
m_mgr.UnInit();
|
||||
}
|
||||
|
||||
void CBreakPointWindow::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
SaveAll();
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void CBreakPointWindow::NotifyUpdate()
|
||||
{
|
||||
m_BreakPointListView->Update();
|
||||
m_BreakPointListView->Repopulate();
|
||||
}
|
||||
|
||||
void CBreakPointWindow::OnDelete(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
@@ -21,21 +21,21 @@ public:
|
||||
~CBreakPointWindow();
|
||||
|
||||
void NotifyUpdate();
|
||||
void SaveAll();
|
||||
void LoadAll();
|
||||
|
||||
private:
|
||||
friend class CBreakPointBar;
|
||||
|
||||
void OnDelete(wxCommandEvent& WXUNUSED(event));
|
||||
void OnClear(wxCommandEvent& WXUNUSED(event));
|
||||
void OnAddBreakPoint(wxCommandEvent& WXUNUSED(event));
|
||||
void OnAddMemoryCheck(wxCommandEvent& WXUNUSED(event));
|
||||
void Event_SaveAll(wxCommandEvent& WXUNUSED(event));
|
||||
void SaveAll();
|
||||
void Event_LoadAll(wxCommandEvent& WXUNUSED(event));
|
||||
void LoadAll();
|
||||
void OnSelectBP(wxListEvent& event);
|
||||
|
||||
private:
|
||||
wxAuiManager m_mgr;
|
||||
CBreakPointView* m_BreakPointListView;
|
||||
CCodeWindow* m_pCodeWindow;
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnSelectBP(wxListEvent& event);
|
||||
};
|
||||
|
||||
@@ -53,9 +53,9 @@ CCodeView::CCodeView(DebugInterface* debuginterface, SymbolDB* symboldb, wxWindo
|
||||
wxWindowID Id)
|
||||
: wxControl(parent, Id), m_debugger(debuginterface), m_symbol_db(symboldb), m_plain(false),
|
||||
m_curAddress(debuginterface->GetPC()), m_align(debuginterface->GetInstructionSize(0)),
|
||||
m_rowHeight(13), m_selection(0), m_oldSelection(0), m_selecting(false), m_lx(-1), m_ly(-1)
|
||||
m_rowHeight(FromDIP(13)), m_left_col_width(FromDIP(LEFT_COL_WIDTH)), m_selection(0),
|
||||
m_oldSelection(0), m_selecting(false)
|
||||
{
|
||||
Bind(wxEVT_ERASE_BACKGROUND, &CCodeView::OnErase, this);
|
||||
Bind(wxEVT_PAINT, &CCodeView::OnPaint, this);
|
||||
Bind(wxEVT_MOUSEWHEEL, &CCodeView::OnScrollWheel, this);
|
||||
Bind(wxEVT_LEFT_DOWN, &CCodeView::OnMouseDown, this);
|
||||
@@ -65,6 +65,13 @@ CCodeView::CCodeView(DebugInterface* debuginterface, SymbolDB* symboldb, wxWindo
|
||||
Bind(wxEVT_RIGHT_UP, &CCodeView::OnMouseUpR, this);
|
||||
Bind(wxEVT_MENU, &CCodeView::OnPopupMenu, this);
|
||||
Bind(wxEVT_SIZE, &CCodeView::OnResize, this);
|
||||
|
||||
// Disable the erase event, the entire window is being painted so the erase
|
||||
// event will just cause unnecessary flicker.
|
||||
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||
#if defined(__WXMSW__) || defined(__WXGTK__)
|
||||
SetDoubleBuffered(true);
|
||||
#endif
|
||||
}
|
||||
|
||||
int CCodeView::YToAddress(int y)
|
||||
@@ -80,7 +87,7 @@ void CCodeView::OnMouseDown(wxMouseEvent& event)
|
||||
int x = event.m_x;
|
||||
int y = event.m_y;
|
||||
|
||||
if (x > 16)
|
||||
if (x > m_left_col_width)
|
||||
{
|
||||
m_oldSelection = m_selection;
|
||||
m_selection = YToAddress(y);
|
||||
@@ -131,7 +138,7 @@ void CCodeView::OnMouseMove(wxMouseEvent& event)
|
||||
{
|
||||
wxRect rc = GetClientRect();
|
||||
|
||||
if (event.m_leftDown && event.m_x > 16)
|
||||
if (event.m_leftDown && event.m_x > m_left_col_width)
|
||||
{
|
||||
if (event.m_y < 0)
|
||||
{
|
||||
@@ -162,7 +169,7 @@ void CCodeView::RaiseEvent()
|
||||
|
||||
void CCodeView::OnMouseUpL(wxMouseEvent& event)
|
||||
{
|
||||
if (event.m_x > 16)
|
||||
if (event.m_x > m_left_col_width)
|
||||
{
|
||||
m_curAddress = YToAddress(event.m_y);
|
||||
m_selecting = false;
|
||||
@@ -222,10 +229,6 @@ void CCodeView::InsertBlrNop(int Blr)
|
||||
|
||||
void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
{
|
||||
#if wxUSE_CLIPBOARD
|
||||
wxTheClipboard->Open();
|
||||
#endif
|
||||
|
||||
switch (event.GetId())
|
||||
{
|
||||
case IDM_GOTOINMEMVIEW:
|
||||
@@ -234,11 +237,15 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
case IDM_COPYADDRESS:
|
||||
{
|
||||
wxClipboardLocker locker;
|
||||
wxTheClipboard->SetData(new wxTextDataObject(wxString::Format("%08x", m_selection)));
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_COPYCODE:
|
||||
{
|
||||
wxClipboardLocker locker;
|
||||
std::string disasm = m_debugger->Disassemble(m_selection);
|
||||
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(disasm)));
|
||||
}
|
||||
@@ -246,8 +253,9 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
|
||||
case IDM_COPYHEX:
|
||||
{
|
||||
std::string temp = StringFromFormat("%08x", m_debugger->ReadInstruction(m_selection));
|
||||
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(temp)));
|
||||
wxClipboardLocker locker;
|
||||
wxTheClipboard->SetData(
|
||||
new wxTextDataObject(wxString::Format("%08x", m_debugger->ReadInstruction(m_selection))));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -266,6 +274,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
std::string disasm = m_debugger->Disassemble(addr);
|
||||
text += StringFromFormat("%08x: ", addr) + disasm + "\r\n";
|
||||
}
|
||||
wxClipboardLocker locker;
|
||||
wxTheClipboard->SetData(new wxTextDataObject(StrToWxStr(text)));
|
||||
}
|
||||
}
|
||||
@@ -283,6 +292,7 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
InsertBlrNop(0);
|
||||
Refresh();
|
||||
break;
|
||||
|
||||
case IDM_INSERTNOP:
|
||||
InsertBlrNop(1);
|
||||
Refresh();
|
||||
@@ -332,12 +342,11 @@ void CCodeView::OnPopupMenu(wxCommandEvent& event)
|
||||
|
||||
case IDM_PATCHALERT:
|
||||
break;
|
||||
}
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
wxTheClipboard->Close();
|
||||
#endif
|
||||
event.Skip();
|
||||
default:
|
||||
event.Skip();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeView::OnMouseUpR(wxMouseEvent& event)
|
||||
@@ -363,104 +372,112 @@ void CCodeView::OnMouseUpR(wxMouseEvent& event)
|
||||
menu.Append(IDM_JITRESULTS, _("PPC vs X86"))->Enable(Core::IsRunning());
|
||||
menu.Append(IDM_INSERTBLR, _("Insert &blr"))->Enable(Core::IsRunning());
|
||||
menu.Append(IDM_INSERTNOP, _("Insert &nop"))->Enable(Core::IsRunning());
|
||||
menu.Append(IDM_PATCHALERT, _("Patch alert"))->Enable(Core::IsRunning());
|
||||
// menu.Append(IDM_PATCHALERT, _("Patch alert"))->Enable(Core::IsRunning());
|
||||
PopupMenu(&menu);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void CCodeView::OnErase(wxEraseEvent& event)
|
||||
{
|
||||
}
|
||||
|
||||
void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
{
|
||||
// -------------------------
|
||||
// General settings
|
||||
// -------------------------
|
||||
std::unique_ptr<wxGraphicsContext> ctx(wxGraphicsContext::Create(wxPaintDC(this)));
|
||||
wxPaintDC paint_dc(this);
|
||||
wxRect rc = GetClientRect();
|
||||
int char_width;
|
||||
|
||||
paint_dc.SetFont(DebuggerFont);
|
||||
{
|
||||
wxFontMetrics metrics = paint_dc.GetFontMetrics();
|
||||
char_width = metrics.averageWidth;
|
||||
if (metrics.height > m_rowHeight)
|
||||
m_rowHeight = metrics.height;
|
||||
}
|
||||
|
||||
std::unique_ptr<wxGraphicsContext> ctx(wxGraphicsContext::Create(paint_dc));
|
||||
ctx->DisableOffset(); // Incompatible with matrix transforms
|
||||
ctx->SetFont(DebuggerFont, *wxBLACK);
|
||||
|
||||
wxDouble w, h;
|
||||
ctx->GetTextExtent("0WJyq", &w, &h);
|
||||
|
||||
if (h > m_rowHeight)
|
||||
m_rowHeight = h;
|
||||
|
||||
ctx->GetTextExtent("W", &w, &h);
|
||||
int charWidth = w;
|
||||
|
||||
struct branch
|
||||
struct Branch
|
||||
{
|
||||
int src, dst, srcAddr;
|
||||
};
|
||||
|
||||
branch branches[256];
|
||||
int numBranches = 0;
|
||||
// TODO: Add any drawing code here...
|
||||
int width = rc.width;
|
||||
int numRows = ((rc.height / m_rowHeight) / 2) + 2;
|
||||
Branch branches[256];
|
||||
int num_branches = 0;
|
||||
const int num_rows = ((rc.height / m_rowHeight) / 2) + 2;
|
||||
|
||||
const double scale = FromDIP(1024) / 1024.0;
|
||||
const int pen_width = static_cast<int>(std::ceil(scale));
|
||||
const int col_width = rc.width - m_left_col_width;
|
||||
const int text_col = m_left_col_width + pen_width / 2 + 1; // 1 unscaled pixel
|
||||
const int bp_offset_x = FromDIP(LEFT_COL_WIDTH / 8);
|
||||
const wxSize bp_size = FromDIP(wxSize(LEFT_COL_WIDTH * 3 / 4, LEFT_COL_WIDTH * 3 / 4));
|
||||
const int bp_offset_y = (m_rowHeight - bp_size.GetHeight()) / 2;
|
||||
// ------------
|
||||
|
||||
// -------------------------
|
||||
// Colors and brushes
|
||||
// -------------------------
|
||||
|
||||
const wxColour bgColor = *wxWHITE;
|
||||
wxPen nullPen(bgColor);
|
||||
wxPen currentPen(*wxBLACK_PEN);
|
||||
wxPen selPen(*wxGREY_PEN);
|
||||
nullPen.SetStyle(wxPENSTYLE_TRANSPARENT);
|
||||
currentPen.SetStyle(wxPENSTYLE_SOLID);
|
||||
wxBrush currentBrush(*wxLIGHT_GREY_BRUSH);
|
||||
wxBrush pcBrush(*wxGREEN_BRUSH);
|
||||
wxBrush bpBrush(*wxRED_BRUSH);
|
||||
wxColour branch_color = wxTheColourDatabase->Find("PURPLE");
|
||||
wxColour blr_color = wxTheColourDatabase->Find("DARK GREEN");
|
||||
wxColour instr_color = wxTheColourDatabase->Find("VIOLET");
|
||||
wxGraphicsPen null_pen = ctx->CreatePen(*wxTRANSPARENT_PEN);
|
||||
wxGraphicsPen focus_pen = ctx->CreatePen(wxPen(*wxBLACK, pen_width));
|
||||
wxGraphicsPen selection_pen = ctx->CreatePen(wxPen("GREY", pen_width));
|
||||
wxGraphicsBrush pc_brush = ctx->CreateBrush(*wxGREEN_BRUSH);
|
||||
wxGraphicsBrush bp_brush = ctx->CreateBrush(*wxRED_BRUSH);
|
||||
wxGraphicsBrush back_brush = ctx->CreateBrush(*wxWHITE_BRUSH);
|
||||
wxGraphicsBrush null_brush = ctx->CreateBrush(*wxTRANSPARENT_BRUSH);
|
||||
|
||||
wxBrush bgBrush(bgColor);
|
||||
wxBrush nullBrush(bgColor);
|
||||
nullBrush.SetStyle(wxBRUSHSTYLE_TRANSPARENT);
|
||||
|
||||
ctx->SetPen(nullPen);
|
||||
ctx->SetBrush(bgBrush);
|
||||
ctx->DrawRectangle(0, 0, 16, rc.height);
|
||||
ctx->DrawRectangle(0, 0, rc.width, 5);
|
||||
// ------------
|
||||
|
||||
// -----------------------------
|
||||
// Walk through all visible rows
|
||||
// -----------------------------
|
||||
for (int i = -numRows; i <= numRows; i++)
|
||||
for (int i = -num_rows; i <= num_rows; i++)
|
||||
{
|
||||
unsigned int address = m_curAddress + (i * m_align);
|
||||
|
||||
int rowY1 = (rc.height / 2) + (m_rowHeight * i) - (m_rowHeight / 2);
|
||||
int rowY2 = (rc.height / 2) + (m_rowHeight * i) + (m_rowHeight / 2);
|
||||
int row_y = (rc.height / 2) + (m_rowHeight * i) - (m_rowHeight / 2);
|
||||
|
||||
wxString temp = wxString::Format("%08x", address);
|
||||
u32 color = m_debugger->GetColor(address);
|
||||
wxBrush rowBrush(wxColour(color >> 16, color >> 8, color));
|
||||
ctx->SetBrush(nullBrush);
|
||||
ctx->SetPen(nullPen);
|
||||
ctx->DrawRectangle(0, rowY1, 16, rowY2 - rowY1 + 2);
|
||||
|
||||
if (m_selecting && (address == m_selection))
|
||||
ctx->SetPen(selPen);
|
||||
else
|
||||
ctx->SetPen(i == 0 ? currentPen : nullPen);
|
||||
wxBrush row_brush(wxColour(color >> 16, color >> 8, color));
|
||||
ctx->SetBrush(back_brush);
|
||||
ctx->SetPen(null_pen);
|
||||
ctx->DrawRectangle(0, row_y, m_left_col_width, m_rowHeight);
|
||||
|
||||
if (address == m_debugger->GetPC())
|
||||
ctx->SetBrush(pcBrush);
|
||||
ctx->SetBrush(pc_brush);
|
||||
else
|
||||
ctx->SetBrush(rowBrush);
|
||||
ctx->SetBrush(row_brush);
|
||||
|
||||
ctx->SetPen(null_pen);
|
||||
ctx->DrawRectangle(m_left_col_width, row_y, col_width, m_rowHeight);
|
||||
if (i == 0 || (m_selecting && address == m_selection))
|
||||
{
|
||||
if (m_selecting && address == m_selection)
|
||||
ctx->SetPen(selection_pen);
|
||||
else
|
||||
ctx->SetPen(focus_pen);
|
||||
ctx->SetBrush(null_brush);
|
||||
// In a graphics context, the border of a rectangle is drawn along the edge,
|
||||
// it does not count towards the width of the rectangle (i.e. drawn right on
|
||||
// the pixel boundary of the fill area, half inside, half outside. For example
|
||||
// a rect with a 1px pen at (5,5)->(10,10) will have an actual screen size of
|
||||
// (4.5,4.5)->(10.5,10.5) with the line being aliased on the half-pixels)
|
||||
double offset = pen_width / 2.0;
|
||||
ctx->DrawRectangle(m_left_col_width + offset, row_y + offset, col_width - pen_width,
|
||||
m_rowHeight - pen_width);
|
||||
}
|
||||
|
||||
ctx->DrawRectangle(16, rowY1, width, rowY2 - rowY1 + 1);
|
||||
ctx->SetBrush(currentBrush);
|
||||
if (!m_plain)
|
||||
{
|
||||
// the address text is dark red
|
||||
ctx->SetFont(DebuggerFont, wxColour("#600000"));
|
||||
ctx->DrawText(temp, 17, rowY1);
|
||||
ctx->SetFont(DebuggerFont, wxColour(0x60, 0x00, 0x00));
|
||||
ctx->DrawText(temp, text_col, row_y);
|
||||
ctx->SetFont(DebuggerFont, *wxBLACK);
|
||||
}
|
||||
|
||||
@@ -488,31 +505,32 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
{
|
||||
u32 offs = std::stoul(hex_str, nullptr, 16);
|
||||
|
||||
branches[numBranches].src = rowY1 + (m_rowHeight / 2);
|
||||
branches[numBranches].srcAddr = (address / m_align);
|
||||
branches[numBranches++].dst =
|
||||
(int)(rowY1 + ((s64)(u32)offs - (s64)(u32)address) * m_rowHeight / m_align +
|
||||
branches[num_branches].src = row_y + (m_rowHeight / 2);
|
||||
branches[num_branches].srcAddr = (address / m_align);
|
||||
branches[num_branches++].dst =
|
||||
(int)(row_y + ((s64)(u32)offs - (s64)(u32)address) * m_rowHeight / m_align +
|
||||
m_rowHeight / 2);
|
||||
desc = StringFromFormat("-->%s", m_debugger->GetDescription(offs).c_str());
|
||||
|
||||
// the -> arrow illustrations are purple
|
||||
ctx->SetFont(DebuggerFont, wxTheColourDatabase->Find("PURPLE"));
|
||||
ctx->SetFont(DebuggerFont, branch_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
ctx->SetFont(DebuggerFont, *wxBLACK);
|
||||
}
|
||||
|
||||
ctx->DrawText(StrToWxStr(operands), 17 + 17 * charWidth, rowY1);
|
||||
ctx->DrawText(StrToWxStr(operands), text_col + 17 * char_width, row_y);
|
||||
// ------------
|
||||
|
||||
// Show blr as its' own color
|
||||
if (opcode == "blr")
|
||||
ctx->SetFont(DebuggerFont, wxTheColourDatabase->Find("DARK GREEN"));
|
||||
ctx->SetFont(DebuggerFont, blr_color);
|
||||
else
|
||||
ctx->SetFont(DebuggerFont, wxTheColourDatabase->Find("VIOLET"));
|
||||
ctx->SetFont(DebuggerFont, instr_color);
|
||||
|
||||
ctx->DrawText(StrToWxStr(opcode), 17 + (m_plain ? 1 * charWidth : 9 * charWidth), rowY1);
|
||||
ctx->DrawText(StrToWxStr(opcode), text_col + (m_plain ? 1 * char_width : 9 * char_width),
|
||||
row_y);
|
||||
|
||||
if (desc.empty())
|
||||
{
|
||||
@@ -527,15 +545,16 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
// UnDecorateSymbolName(desc,temp,255,UNDNAME_COMPLETE);
|
||||
if (!desc.empty())
|
||||
{
|
||||
ctx->DrawText(StrToWxStr(desc), 17 + 35 * charWidth, rowY1);
|
||||
ctx->DrawText(StrToWxStr(desc), text_col + 45 * char_width, row_y);
|
||||
}
|
||||
}
|
||||
|
||||
// Show red breakpoint dot
|
||||
if (m_debugger->IsBreakpoint(address))
|
||||
{
|
||||
ctx->SetBrush(bpBrush);
|
||||
ctx->DrawRectangle(2, rowY1 + 1, 11, 11);
|
||||
ctx->SetPen(null_pen);
|
||||
ctx->SetBrush(bp_brush);
|
||||
ctx->DrawEllipse(bp_offset_x, row_y + bp_offset_y, bp_size.GetWidth(), bp_size.GetHeight());
|
||||
}
|
||||
}
|
||||
} // end of for
|
||||
@@ -544,22 +563,24 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
// -------------------------
|
||||
// Colors and brushes
|
||||
// -------------------------
|
||||
ctx->SetPen(currentPen);
|
||||
ctx->SetPen(focus_pen);
|
||||
|
||||
for (int i = 0; i < numBranches; i++)
|
||||
wxGraphicsPath branch_path = ctx->CreatePath();
|
||||
|
||||
for (int i = 0; i < num_branches; ++i)
|
||||
{
|
||||
int x = 17 + 49 * charWidth + (branches[i].srcAddr % 9) * 8;
|
||||
MoveTo(x - 2, branches[i].src);
|
||||
int x = text_col + 52 * char_width + (branches[i].srcAddr % 9) * 8;
|
||||
branch_path.MoveToPoint(x - 2 * scale, branches[i].src);
|
||||
|
||||
if (branches[i].dst < rc.height + 400 && branches[i].dst > -400)
|
||||
{
|
||||
LineTo(ctx, x + 2, branches[i].src);
|
||||
LineTo(ctx, x + 2, branches[i].dst);
|
||||
LineTo(ctx, x - 4, branches[i].dst);
|
||||
branch_path.AddLineToPoint(x + 2 * scale, branches[i].src);
|
||||
branch_path.AddLineToPoint(x + 2 * scale, branches[i].dst);
|
||||
branch_path.AddLineToPoint(x - 4 * scale, branches[i].dst);
|
||||
|
||||
MoveTo(x, branches[i].dst - 4);
|
||||
LineTo(ctx, x - 4, branches[i].dst);
|
||||
LineTo(ctx, x + 1, branches[i].dst + 5);
|
||||
branch_path.MoveToPoint(x, branches[i].dst - 4 * scale);
|
||||
branch_path.AddLineToPoint(x - 4 * scale, branches[i].dst);
|
||||
branch_path.AddLineToPoint(x + 1 * scale, branches[i].dst + 5 * scale);
|
||||
}
|
||||
// else
|
||||
//{
|
||||
@@ -575,18 +596,19 @@ void CCodeView::OnPaint(wxPaintEvent& event)
|
||||
// LineTo(ctx, x, branches[i].dst+4);
|
||||
// LineTo(ctx, x-2, branches[i].dst);
|
||||
}
|
||||
|
||||
// If the pen width is odd then we need to offset the path so that lines are drawn in
|
||||
// the middle of pixels instead of the edge so we don't get aliasing.
|
||||
if (pen_width & 1)
|
||||
{
|
||||
wxGraphicsMatrix matrix = ctx->CreateMatrix();
|
||||
matrix.Translate(0.5, 0.5);
|
||||
branch_path.Transform(matrix);
|
||||
}
|
||||
ctx->StrokePath(branch_path);
|
||||
// ------------
|
||||
}
|
||||
|
||||
void CCodeView::LineTo(std::unique_ptr<wxGraphicsContext>& ctx, int x, int y)
|
||||
{
|
||||
std::vector<wxPoint2DDouble> points{wxPoint2DDouble(m_lx, m_ly), wxPoint2DDouble(x, y)};
|
||||
|
||||
ctx->DrawLines(points.size(), points.data());
|
||||
m_lx = x;
|
||||
m_ly = y;
|
||||
}
|
||||
|
||||
void CCodeView::OnResize(wxSizeEvent& event)
|
||||
{
|
||||
Refresh();
|
||||
|
||||
@@ -40,7 +40,6 @@ public:
|
||||
void SetPlain() { m_plain = true; }
|
||||
private:
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void OnErase(wxEraseEvent& event);
|
||||
void OnScrollWheel(wxMouseEvent& event);
|
||||
void OnMouseDown(wxMouseEvent& event);
|
||||
void OnMouseMove(wxMouseEvent& event);
|
||||
@@ -55,14 +54,6 @@ private:
|
||||
u32 AddrToBranch(u32 addr);
|
||||
void OnResize(wxSizeEvent& event);
|
||||
|
||||
void MoveTo(int x, int y)
|
||||
{
|
||||
m_lx = x;
|
||||
m_ly = y;
|
||||
}
|
||||
|
||||
void LineTo(std::unique_ptr<wxGraphicsContext>& dc, int x, int y);
|
||||
|
||||
struct BlrStruct // for IDM_INSERTBLR
|
||||
{
|
||||
u32 address;
|
||||
@@ -70,6 +61,8 @@ private:
|
||||
};
|
||||
std::vector<BlrStruct> m_blrList;
|
||||
|
||||
static constexpr int LEFT_COL_WIDTH = 16;
|
||||
|
||||
DebugInterface* m_debugger;
|
||||
SymbolDB* m_symbol_db;
|
||||
|
||||
@@ -78,10 +71,9 @@ private:
|
||||
int m_curAddress;
|
||||
int m_align;
|
||||
int m_rowHeight;
|
||||
int m_left_col_width;
|
||||
|
||||
u32 m_selection;
|
||||
u32 m_oldSelection;
|
||||
bool m_selecting;
|
||||
|
||||
int m_lx, m_ly;
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "DolphinWX/Debugger/CodeWindow.h"
|
||||
#include "DolphinWX/Debugger/DebuggerUIUtil.h"
|
||||
#include "DolphinWX/Debugger/JitWindow.h"
|
||||
#include "DolphinWX/Debugger/MemoryWindow.h"
|
||||
#include "DolphinWX/Debugger/RegisterWindow.h"
|
||||
#include "DolphinWX/Debugger/WatchWindow.h"
|
||||
#include "DolphinWX/AuiToolBar.h"
|
||||
@@ -54,9 +55,8 @@
|
||||
CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame* parent, wxWindowID id,
|
||||
const wxPoint& position, const wxSize& size, long style,
|
||||
const wxString& name)
|
||||
: wxPanel(parent, id, position, size, style, name), Parent(parent), m_RegisterWindow(nullptr),
|
||||
m_WatchWindow(nullptr), m_BreakpointWindow(nullptr), m_MemoryWindow(nullptr),
|
||||
m_JitWindow(nullptr), m_SoundWindow(nullptr), m_VideoWindow(nullptr), codeview(nullptr)
|
||||
: wxPanel(parent, id, position, size, style, name), m_sibling_panels(), Parent(parent),
|
||||
codeview(nullptr)
|
||||
{
|
||||
InitBitmaps();
|
||||
|
||||
@@ -88,21 +88,31 @@ CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame* pare
|
||||
|
||||
m_aui_manager.SetManagedWindow(this);
|
||||
m_aui_manager.SetFlags(wxAUI_MGR_DEFAULT | wxAUI_MGR_LIVE_RESIZE);
|
||||
m_aui_manager.AddPane(m_aui_toolbar,
|
||||
wxAuiPaneInfo().MinSize(150, -1).ToolbarPane().Top().Floatable(false));
|
||||
m_aui_manager.AddPane(
|
||||
callstack,
|
||||
wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(
|
||||
_("Callstack")));
|
||||
m_aui_manager.AddPane(
|
||||
symbols, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(
|
||||
_("Symbols")));
|
||||
m_aui_manager.AddPane(
|
||||
calls, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(
|
||||
_("Function calls")));
|
||||
m_aui_manager.AddPane(
|
||||
callers, wxAuiPaneInfo().MinSize(150, 100).Left().CloseButton(false).Floatable(false).Caption(
|
||||
_("Function callers")));
|
||||
m_aui_manager.AddPane(m_aui_toolbar, wxAuiPaneInfo().ToolbarPane().Top().Floatable(false));
|
||||
m_aui_manager.AddPane(callstack, wxAuiPaneInfo()
|
||||
.MinSize(FromDIP(wxSize(150, 100)))
|
||||
.Left()
|
||||
.CloseButton(false)
|
||||
.Floatable(false)
|
||||
.Caption(_("Callstack")));
|
||||
m_aui_manager.AddPane(symbols, wxAuiPaneInfo()
|
||||
.MinSize(FromDIP(wxSize(150, 100)))
|
||||
.Left()
|
||||
.CloseButton(false)
|
||||
.Floatable(false)
|
||||
.Caption(_("Symbols")));
|
||||
m_aui_manager.AddPane(calls, wxAuiPaneInfo()
|
||||
.MinSize(FromDIP(wxSize(150, 100)))
|
||||
.Left()
|
||||
.CloseButton(false)
|
||||
.Floatable(false)
|
||||
.Caption(_("Function calls")));
|
||||
m_aui_manager.AddPane(callers, wxAuiPaneInfo()
|
||||
.MinSize(FromDIP(wxSize(150, 100)))
|
||||
.Left()
|
||||
.CloseButton(false)
|
||||
.Floatable(false)
|
||||
.Caption(_("Function callers")));
|
||||
m_aui_manager.AddPane(codeview, wxAuiPaneInfo().CenterPane().CloseButton(false).Floatable(false));
|
||||
m_aui_manager.Update();
|
||||
|
||||
@@ -144,30 +154,30 @@ void CCodeWindow::OnHostMessage(wxCommandEvent& event)
|
||||
{
|
||||
case IDM_NOTIFY_MAP_LOADED:
|
||||
NotifyMapLoaded();
|
||||
if (m_BreakpointWindow)
|
||||
m_BreakpointWindow->NotifyUpdate();
|
||||
if (HasPanel<CBreakPointWindow>())
|
||||
GetPanel<CBreakPointWindow>()->NotifyUpdate();
|
||||
break;
|
||||
|
||||
case IDM_UPDATE_DISASM_DIALOG:
|
||||
Update();
|
||||
if (CPU::IsStepping())
|
||||
Parent->UpdateGUI();
|
||||
if (m_RegisterWindow)
|
||||
m_RegisterWindow->NotifyUpdate();
|
||||
if (m_WatchWindow)
|
||||
m_WatchWindow->NotifyUpdate();
|
||||
Repopulate();
|
||||
if (HasPanel<CRegisterWindow>())
|
||||
GetPanel<CRegisterWindow>()->NotifyUpdate();
|
||||
if (HasPanel<CWatchWindow>())
|
||||
GetPanel<CWatchWindow>()->NotifyUpdate();
|
||||
if (HasPanel<CMemoryWindow>())
|
||||
GetPanel<CMemoryWindow>()->Refresh();
|
||||
break;
|
||||
|
||||
case IDM_UPDATE_BREAKPOINTS:
|
||||
if (m_BreakpointWindow)
|
||||
m_BreakpointWindow->NotifyUpdate();
|
||||
Repopulate();
|
||||
if (HasPanel<CBreakPointWindow>())
|
||||
GetPanel<CBreakPointWindow>()->NotifyUpdate();
|
||||
if (HasPanel<CMemoryWindow>())
|
||||
GetPanel<CMemoryWindow>()->Refresh();
|
||||
break;
|
||||
|
||||
case IDM_UPDATE_JIT_PANE:
|
||||
// Check if the JIT pane is in the AUI notebook. If not, add it and switch to it.
|
||||
if (!m_JitWindow)
|
||||
ToggleJitWindow(true);
|
||||
m_JitWindow->ViewAddr(codeview->GetSelection());
|
||||
RequirePanel<CJitWindow>()->ViewAddr(codeview->GetSelection());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -195,12 +205,12 @@ void CCodeWindow::OnCodeStep(wxCommandEvent& event)
|
||||
|
||||
case IDM_SKIP:
|
||||
PC += 4;
|
||||
Update();
|
||||
Repopulate();
|
||||
break;
|
||||
|
||||
case IDM_SETPC:
|
||||
PC = codeview->GetSelection();
|
||||
Update();
|
||||
Repopulate();
|
||||
break;
|
||||
|
||||
case IDM_GOTOPC:
|
||||
@@ -373,8 +383,12 @@ void CCodeWindow::StepOut()
|
||||
PowerPC::SetMode(old_mode);
|
||||
CPU::PauseAndLock(false, false);
|
||||
|
||||
Host_UpdateDisasmDialog();
|
||||
UpdateButtonStates();
|
||||
JumpToAddress(PC);
|
||||
{
|
||||
wxCommandEvent ev(wxEVT_HOST_COMMAND, IDM_UPDATE_DISASM_DIALOG);
|
||||
GetEventHandler()->ProcessEvent(ev);
|
||||
}
|
||||
|
||||
// Update all toolbars in the aui manager
|
||||
Parent->UpdateGUI();
|
||||
}
|
||||
@@ -386,7 +400,7 @@ void CCodeWindow::ToggleBreakpoint()
|
||||
{
|
||||
if (codeview)
|
||||
codeview->ToggleBreakpoint(codeview->GetSelection());
|
||||
Update();
|
||||
Repopulate();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,7 +709,7 @@ void CCodeWindow::PopulateToolbar(wxToolBar* toolBar)
|
||||
}
|
||||
|
||||
// Update GUI
|
||||
void CCodeWindow::Update()
|
||||
void CCodeWindow::Repopulate()
|
||||
{
|
||||
if (!codeview)
|
||||
return;
|
||||
@@ -714,41 +728,28 @@ void CCodeWindow::UpdateButtonStates()
|
||||
bool Initialized = (Core::GetState() != Core::CORE_UNINITIALIZED);
|
||||
bool Pause = (Core::GetState() == Core::CORE_PAUSE);
|
||||
bool Stepping = CPU::IsStepping();
|
||||
bool can_step = Initialized && Stepping;
|
||||
wxToolBar* ToolBar = GetToolBar();
|
||||
|
||||
// Toolbar
|
||||
if (!ToolBar)
|
||||
return;
|
||||
|
||||
if (!Initialized)
|
||||
{
|
||||
ToolBar->EnableTool(IDM_STEPOVER, false);
|
||||
ToolBar->EnableTool(IDM_STEPOUT, false);
|
||||
ToolBar->EnableTool(IDM_SKIP, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!Stepping)
|
||||
{
|
||||
ToolBar->EnableTool(IDM_STEPOVER, false);
|
||||
ToolBar->EnableTool(IDM_STEPOUT, false);
|
||||
ToolBar->EnableTool(IDM_SKIP, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
ToolBar->EnableTool(IDM_STEPOVER, true);
|
||||
ToolBar->EnableTool(IDM_STEPOUT, true);
|
||||
ToolBar->EnableTool(IDM_SKIP, true);
|
||||
}
|
||||
}
|
||||
|
||||
ToolBar->EnableTool(IDM_STEP, Initialized && Stepping);
|
||||
ToolBar->EnableTool(IDM_STEP, can_step);
|
||||
ToolBar->EnableTool(IDM_STEPOVER, can_step);
|
||||
ToolBar->EnableTool(IDM_STEPOUT, can_step);
|
||||
ToolBar->EnableTool(IDM_SKIP, can_step);
|
||||
ToolBar->EnableTool(IDM_SETPC, Pause);
|
||||
ToolBar->Realize();
|
||||
|
||||
// Menu bar
|
||||
// ------------------
|
||||
GetMenuBar()->Enable(IDM_INTERPRETER, Pause); // CPU Mode
|
||||
|
||||
GetMenuBar()->Enable(IDM_STEP, can_step);
|
||||
GetMenuBar()->Enable(IDM_STEPOVER, can_step);
|
||||
GetMenuBar()->Enable(IDM_STEPOUT, can_step);
|
||||
|
||||
GetMenuBar()->Enable(IDM_JIT_NO_BLOCK_CACHE, !Initialized);
|
||||
|
||||
GetMenuBar()->Enable(IDM_JIT_OFF, Pause);
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
|
||||
#include <wx/aui/framemanager.h>
|
||||
#include <wx/bitmap.h>
|
||||
#include <wx/panel.h>
|
||||
@@ -12,16 +14,16 @@
|
||||
#include "Common/Event.h"
|
||||
#include "DolphinWX/Globals.h"
|
||||
|
||||
class CCodeView;
|
||||
class CFrame;
|
||||
struct SConfig;
|
||||
class CBreakPointWindow;
|
||||
class CRegisterWindow;
|
||||
class CWatchWindow;
|
||||
class CBreakPointWindow;
|
||||
class CMemoryWindow;
|
||||
class CJitWindow;
|
||||
class CCodeView;
|
||||
class DSPDebuggerLLE;
|
||||
class GFXDebuggerPanel;
|
||||
struct SConfig;
|
||||
|
||||
class DolphinAuiToolBar;
|
||||
class wxListBox;
|
||||
@@ -29,6 +31,48 @@ class wxMenu;
|
||||
class wxMenuBar;
|
||||
class wxToolBar;
|
||||
|
||||
namespace Details
|
||||
{
|
||||
template <class T>
|
||||
struct DebugPanelToID;
|
||||
|
||||
template <>
|
||||
struct DebugPanelToID<CBreakPointWindow>
|
||||
{
|
||||
static constexpr int ID = IDM_BREAKPOINT_WINDOW;
|
||||
};
|
||||
template <>
|
||||
struct DebugPanelToID<CRegisterWindow>
|
||||
{
|
||||
static constexpr int ID = IDM_REGISTER_WINDOW;
|
||||
};
|
||||
template <>
|
||||
struct DebugPanelToID<CWatchWindow>
|
||||
{
|
||||
static constexpr int ID = IDM_WATCH_WINDOW;
|
||||
};
|
||||
template <>
|
||||
struct DebugPanelToID<CMemoryWindow>
|
||||
{
|
||||
static constexpr int ID = IDM_MEMORY_WINDOW;
|
||||
};
|
||||
template <>
|
||||
struct DebugPanelToID<CJitWindow>
|
||||
{
|
||||
static constexpr int ID = IDM_JIT_WINDOW;
|
||||
};
|
||||
template <>
|
||||
struct DebugPanelToID<DSPDebuggerLLE>
|
||||
{
|
||||
static constexpr int ID = IDM_SOUND_WINDOW;
|
||||
};
|
||||
template <>
|
||||
struct DebugPanelToID<GFXDebuggerPanel>
|
||||
{
|
||||
static constexpr int ID = IDM_VIDEO_WINDOW;
|
||||
};
|
||||
}
|
||||
|
||||
class CCodeWindow : public wxPanel
|
||||
{
|
||||
public:
|
||||
@@ -41,10 +85,8 @@ public:
|
||||
void Save();
|
||||
|
||||
// Parent interaction
|
||||
CFrame* Parent;
|
||||
wxMenuBar* GetMenuBar();
|
||||
wxToolBar* GetToolBar();
|
||||
wxBitmap m_Bitmaps[Toolbar_Debug_Bitmap_Max];
|
||||
|
||||
bool UseInterpreter();
|
||||
bool BootToPause();
|
||||
@@ -53,7 +95,7 @@ public:
|
||||
bool JITNoBlockLinking();
|
||||
bool JumpToAddress(u32 address);
|
||||
|
||||
void Update() override;
|
||||
void Repopulate();
|
||||
void NotifyMapLoaded();
|
||||
void CreateMenu(const SConfig& _LocalCoreStartupParameter, wxMenuBar* pMenuBar);
|
||||
void CreateMenuOptions(wxMenu* pMenu);
|
||||
@@ -63,29 +105,35 @@ public:
|
||||
void OpenPages();
|
||||
|
||||
// Menu bar
|
||||
void ToggleCodeWindow(bool bShow);
|
||||
void ToggleRegisterWindow(bool bShow);
|
||||
void ToggleWatchWindow(bool bShow);
|
||||
void ToggleBreakPointWindow(bool bShow);
|
||||
void ToggleMemoryWindow(bool bShow);
|
||||
void ToggleJitWindow(bool bShow);
|
||||
void ToggleSoundWindow(bool bShow);
|
||||
void ToggleVideoWindow(bool bShow);
|
||||
// FIXME: This belongs in a separate class.
|
||||
void TogglePanel(int id, bool show);
|
||||
wxPanel* GetUntypedPanel(int id) const;
|
||||
bool HasUntypedPanel(int id) const { return GetUntypedPanel(id) != nullptr; }
|
||||
template <class T>
|
||||
T* GetPanel() const
|
||||
{
|
||||
return static_cast<T*>(GetUntypedPanel(Details::DebugPanelToID<T>::ID));
|
||||
}
|
||||
template <class T>
|
||||
bool HasPanel() const
|
||||
{
|
||||
return HasUntypedPanel(Details::DebugPanelToID<T>::ID);
|
||||
}
|
||||
template <class T>
|
||||
T* RequirePanel()
|
||||
{
|
||||
if (T* p = GetPanel<T>())
|
||||
return p;
|
||||
|
||||
// Sub dialogs
|
||||
CRegisterWindow* m_RegisterWindow;
|
||||
CWatchWindow* m_WatchWindow;
|
||||
CBreakPointWindow* m_BreakpointWindow;
|
||||
CMemoryWindow* m_MemoryWindow;
|
||||
CJitWindow* m_JitWindow;
|
||||
DSPDebuggerLLE* m_SoundWindow;
|
||||
GFXDebuggerPanel* m_VideoWindow;
|
||||
TogglePanel(Details::DebugPanelToID<T>::ID, true);
|
||||
return GetPanel<T>();
|
||||
}
|
||||
|
||||
// Settings
|
||||
bool bAutomaticStart;
|
||||
bool bBootToPause;
|
||||
bool bShowOnStart[IDM_VIDEO_WINDOW - IDM_LOG_WINDOW + 1];
|
||||
int iNbAffiliation[IDM_CODE_WINDOW - IDM_LOG_WINDOW + 1];
|
||||
bool bShowOnStart[IDM_DEBUG_WINDOW_LIST_END - IDM_DEBUG_WINDOW_LIST_START];
|
||||
int iNbAffiliation[IDM_DEBUG_WINDOW_LIST_END - IDM_DEBUG_WINDOW_LIST_START];
|
||||
|
||||
private:
|
||||
void OnCPUMode(wxCommandEvent& event);
|
||||
@@ -99,7 +147,6 @@ private:
|
||||
void OnProfilerMenu(wxCommandEvent& event);
|
||||
|
||||
void OnSymbolListChange(wxCommandEvent& event);
|
||||
void OnSymbolListContextMenu(wxContextMenuEvent& event);
|
||||
void OnCallstackListChange(wxCommandEvent& event);
|
||||
void OnCallersListChange(wxCommandEvent& event);
|
||||
void OnCallsListChange(wxCommandEvent& event);
|
||||
@@ -116,7 +163,15 @@ private:
|
||||
void UpdateCallstack();
|
||||
|
||||
void InitBitmaps();
|
||||
wxPanel* CreateSiblingPanel(int id);
|
||||
|
||||
wxBitmap m_Bitmaps[Toolbar_Debug_Bitmap_Max];
|
||||
|
||||
// Sibling debugger panels
|
||||
// FIXME: This obviously belongs in some manager class above this one.
|
||||
std::array<wxPanel*, IDM_DEBUG_WINDOW_LIST_END - IDM_DEBUG_WINDOW_LIST_START> m_sibling_panels;
|
||||
|
||||
CFrame* Parent;
|
||||
CCodeView* codeview;
|
||||
wxListBox* callstack;
|
||||
wxListBox* symbols;
|
||||
|
||||
@@ -453,7 +453,7 @@ void CCodeWindow::OnSymbolsMenu(wxCommandEvent& event)
|
||||
break;
|
||||
case IDM_PATCH_HLE_FUNCTIONS:
|
||||
HLE::PatchFunctions();
|
||||
Update();
|
||||
Repopulate();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -464,7 +464,6 @@ void CCodeWindow::NotifyMapLoaded()
|
||||
return;
|
||||
|
||||
g_symbolDB.FillInCallers();
|
||||
// symbols->Show(false); // hide it for faster filling
|
||||
symbols->Freeze(); // HyperIris: wx style fast filling
|
||||
symbols->Clear();
|
||||
for (const auto& symbol : g_symbolDB.Symbols())
|
||||
@@ -473,8 +472,7 @@ void CCodeWindow::NotifyMapLoaded()
|
||||
symbols->SetClientData(idx, (void*)&symbol.second);
|
||||
}
|
||||
symbols->Thaw();
|
||||
// symbols->Show(true);
|
||||
Update();
|
||||
Repopulate();
|
||||
}
|
||||
|
||||
void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||
@@ -487,8 +485,9 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||
{
|
||||
if (pSymbol->type == Symbol::Type::Data)
|
||||
{
|
||||
if (m_MemoryWindow) // && m_MemoryWindow->IsVisible())
|
||||
m_MemoryWindow->JumpToAddress(pSymbol->address);
|
||||
CMemoryWindow* memory = GetPanel<CMemoryWindow>();
|
||||
if (memory)
|
||||
memory->JumpToAddress(pSymbol->address);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -498,10 +497,6 @@ void CCodeWindow::OnSymbolListChange(wxCommandEvent& event)
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::OnSymbolListContextMenu(wxContextMenuEvent& event)
|
||||
{
|
||||
}
|
||||
|
||||
// Change the global DebuggerFont
|
||||
void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
||||
{
|
||||
@@ -511,157 +506,104 @@ void CCodeWindow::OnChangeFont(wxCommandEvent& event)
|
||||
wxFontDialog dialog(this, data);
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
DebuggerFont = dialog.GetFontData().GetChosenFont();
|
||||
|
||||
// TODO: Send event to all panels that tells them to reload the font when it changes.
|
||||
}
|
||||
|
||||
// Toggle windows
|
||||
|
||||
wxPanel* CCodeWindow::GetUntypedPanel(int id) const
|
||||
{
|
||||
wxASSERT_MSG(id >= IDM_DEBUG_WINDOW_LIST_START && id < IDM_DEBUG_WINDOW_LIST_END,
|
||||
"ID out of range");
|
||||
wxASSERT_MSG(id != IDM_LOG_WINDOW && id != IDM_LOG_CONFIG_WINDOW,
|
||||
"Log windows are managed separately");
|
||||
return m_sibling_panels.at(id - IDM_DEBUG_WINDOW_LIST_START);
|
||||
}
|
||||
|
||||
void CCodeWindow::TogglePanel(int id, bool show)
|
||||
{
|
||||
wxPanel* panel = GetUntypedPanel(id);
|
||||
|
||||
// Not all the panels (i.e. CodeWindow) have corresponding menu options.
|
||||
wxMenuItem* item = GetMenuBar()->FindItem(id);
|
||||
if (item)
|
||||
item->Check(show);
|
||||
|
||||
if (show)
|
||||
{
|
||||
if (!panel)
|
||||
{
|
||||
panel = CreateSiblingPanel(id);
|
||||
}
|
||||
Parent->DoAddPage(panel, iNbAffiliation[id - IDM_DEBUG_WINDOW_LIST_START],
|
||||
Parent->bFloatWindow[id - IDM_DEBUG_WINDOW_LIST_START]);
|
||||
}
|
||||
else if (panel) // Close
|
||||
{
|
||||
Parent->DoRemovePage(panel, panel == this);
|
||||
m_sibling_panels[id - IDM_DEBUG_WINDOW_LIST_START] = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
wxPanel* CCodeWindow::CreateSiblingPanel(int id)
|
||||
{
|
||||
// Includes range check inside the get call
|
||||
wxASSERT_MSG(!GetUntypedPanel(id), "Panel must not already exist");
|
||||
|
||||
wxPanel* panel = nullptr;
|
||||
switch (id)
|
||||
{
|
||||
// case IDM_LOG_WINDOW: // These exist separately in CFrame.
|
||||
// case IDM_LOG_CONFIG_WINDOW:
|
||||
case IDM_REGISTER_WINDOW:
|
||||
panel = new CRegisterWindow(Parent, IDM_REGISTER_WINDOW);
|
||||
break;
|
||||
case IDM_WATCH_WINDOW:
|
||||
panel = new CWatchWindow(Parent, IDM_WATCH_WINDOW);
|
||||
break;
|
||||
case IDM_BREAKPOINT_WINDOW:
|
||||
panel = new CBreakPointWindow(this, Parent, IDM_BREAKPOINT_WINDOW);
|
||||
break;
|
||||
case IDM_MEMORY_WINDOW:
|
||||
panel = new CMemoryWindow(Parent, IDM_MEMORY_WINDOW);
|
||||
break;
|
||||
case IDM_JIT_WINDOW:
|
||||
panel = new CJitWindow(Parent, IDM_JIT_WINDOW);
|
||||
break;
|
||||
case IDM_SOUND_WINDOW:
|
||||
panel = new DSPDebuggerLLE(Parent, IDM_SOUND_WINDOW);
|
||||
break;
|
||||
case IDM_VIDEO_WINDOW:
|
||||
panel = new GFXDebuggerPanel(Parent, IDM_VIDEO_WINDOW);
|
||||
break;
|
||||
case IDM_CODE_WINDOW:
|
||||
panel = this;
|
||||
break;
|
||||
default:
|
||||
wxTrap();
|
||||
break;
|
||||
}
|
||||
|
||||
m_sibling_panels[id - IDM_DEBUG_WINDOW_LIST_START] = panel;
|
||||
return panel;
|
||||
}
|
||||
|
||||
void CCodeWindow::OpenPages()
|
||||
{
|
||||
ToggleCodeWindow(true);
|
||||
if (bShowOnStart[0])
|
||||
// This is forced, and should always be placed as the first tab in the notebook.
|
||||
TogglePanel(IDM_CODE_WINDOW, true);
|
||||
|
||||
// These panels are managed separately by CFrame
|
||||
if (bShowOnStart[IDM_LOG_WINDOW - IDM_DEBUG_WINDOW_LIST_START])
|
||||
Parent->ToggleLogWindow(true);
|
||||
if (bShowOnStart[IDM_LOG_CONFIG_WINDOW - IDM_LOG_WINDOW])
|
||||
if (bShowOnStart[IDM_LOG_CONFIG_WINDOW - IDM_DEBUG_WINDOW_LIST_START])
|
||||
Parent->ToggleLogConfigWindow(true);
|
||||
if (bShowOnStart[IDM_REGISTER_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleRegisterWindow(true);
|
||||
if (bShowOnStart[IDM_WATCH_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleWatchWindow(true);
|
||||
if (bShowOnStart[IDM_BREAKPOINT_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleBreakPointWindow(true);
|
||||
if (bShowOnStart[IDM_MEMORY_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleMemoryWindow(true);
|
||||
if (bShowOnStart[IDM_JIT_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleJitWindow(true);
|
||||
if (bShowOnStart[IDM_SOUND_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleSoundWindow(true);
|
||||
if (bShowOnStart[IDM_VIDEO_WINDOW - IDM_LOG_WINDOW])
|
||||
ToggleVideoWindow(true);
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleCodeWindow(bool bShow)
|
||||
{
|
||||
if (bShow)
|
||||
Parent->DoAddPage(this, iNbAffiliation[IDM_CODE_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_CODE_WINDOW - IDM_LOG_WINDOW]);
|
||||
else // Hide
|
||||
Parent->DoRemovePage(this);
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleRegisterWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_REGISTER_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
// Iterate normal panels that don't have weird rules.
|
||||
for (int i = IDM_REGISTER_WINDOW; i < IDM_CODE_WINDOW; ++i)
|
||||
{
|
||||
if (!m_RegisterWindow)
|
||||
m_RegisterWindow = new CRegisterWindow(Parent, IDM_REGISTER_WINDOW);
|
||||
Parent->DoAddPage(m_RegisterWindow, iNbAffiliation[IDM_REGISTER_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_REGISTER_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_RegisterWindow, false);
|
||||
m_RegisterWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleWatchWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_WATCH_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
{
|
||||
if (!m_WatchWindow)
|
||||
m_WatchWindow = new CWatchWindow(Parent, IDM_WATCH_WINDOW);
|
||||
Parent->DoAddPage(m_WatchWindow, iNbAffiliation[IDM_WATCH_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_WATCH_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_WatchWindow, false);
|
||||
m_WatchWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleBreakPointWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_BREAKPOINT_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
{
|
||||
if (!m_BreakpointWindow)
|
||||
m_BreakpointWindow = new CBreakPointWindow(this, Parent, IDM_BREAKPOINT_WINDOW);
|
||||
Parent->DoAddPage(m_BreakpointWindow, iNbAffiliation[IDM_BREAKPOINT_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_BREAKPOINT_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_BreakpointWindow, false);
|
||||
m_BreakpointWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleMemoryWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_MEMORY_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
{
|
||||
if (!m_MemoryWindow)
|
||||
m_MemoryWindow = new CMemoryWindow(this, Parent, IDM_MEMORY_WINDOW);
|
||||
Parent->DoAddPage(m_MemoryWindow, iNbAffiliation[IDM_MEMORY_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_MEMORY_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_MemoryWindow, false);
|
||||
m_MemoryWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleJitWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_JIT_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
{
|
||||
if (!m_JitWindow)
|
||||
m_JitWindow = new CJitWindow(Parent, IDM_JIT_WINDOW);
|
||||
Parent->DoAddPage(m_JitWindow, iNbAffiliation[IDM_JIT_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_JIT_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_JitWindow, false);
|
||||
m_JitWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleSoundWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_SOUND_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
{
|
||||
if (!m_SoundWindow)
|
||||
m_SoundWindow = new DSPDebuggerLLE(Parent, IDM_SOUND_WINDOW);
|
||||
Parent->DoAddPage(m_SoundWindow, iNbAffiliation[IDM_SOUND_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_SOUND_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_SoundWindow, false);
|
||||
m_SoundWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void CCodeWindow::ToggleVideoWindow(bool bShow)
|
||||
{
|
||||
GetMenuBar()->FindItem(IDM_VIDEO_WINDOW)->Check(bShow);
|
||||
if (bShow)
|
||||
{
|
||||
if (!m_VideoWindow)
|
||||
m_VideoWindow = new GFXDebuggerPanel(Parent, IDM_VIDEO_WINDOW);
|
||||
Parent->DoAddPage(m_VideoWindow, iNbAffiliation[IDM_VIDEO_WINDOW - IDM_LOG_WINDOW],
|
||||
Parent->bFloatWindow[IDM_VIDEO_WINDOW - IDM_LOG_WINDOW]);
|
||||
}
|
||||
else // Close
|
||||
{
|
||||
Parent->DoRemovePage(m_VideoWindow, false);
|
||||
m_VideoWindow = nullptr;
|
||||
if (bShowOnStart[i - IDM_DEBUG_WINDOW_LIST_START])
|
||||
TogglePanel(i, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,8 @@ static DSPDebuggerLLE* m_DebuggerFrame = nullptr;
|
||||
|
||||
DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _("DSP LLE Debugger")),
|
||||
m_CachedStepCounter(-1)
|
||||
m_CachedStepCounter(-1), m_toolbar_item_size(FromDIP(wxSize(16, 16)))
|
||||
{
|
||||
Bind(wxEVT_CLOSE_WINDOW, &DSPDebuggerLLE::OnClose, this);
|
||||
Bind(wxEVT_MENU, &DSPDebuggerLLE::OnChangeState, this, ID_RUNTOOL, ID_SHOWPCTOOL);
|
||||
|
||||
m_DebuggerFrame = this;
|
||||
@@ -46,11 +45,12 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||
m_Toolbar =
|
||||
new DolphinAuiToolBar(this, ID_TOOLBAR, wxDefaultPosition, wxDefaultSize, wxAUI_TB_HORZ_TEXT);
|
||||
m_Toolbar->AddTool(ID_RUNTOOL, _("Pause"),
|
||||
wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10, 10)));
|
||||
wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, m_toolbar_item_size));
|
||||
m_Toolbar->AddTool(ID_STEPTOOL, _("Step"),
|
||||
wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_OTHER, wxSize(10, 10)));
|
||||
m_Toolbar->AddTool(ID_SHOWPCTOOL, _("Show PC"),
|
||||
wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_OTHER, wxSize(10, 10)));
|
||||
wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_OTHER, m_toolbar_item_size));
|
||||
m_Toolbar->AddTool(
|
||||
ID_SHOWPCTOOL, _("Show PC"),
|
||||
wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_OTHER, m_toolbar_item_size));
|
||||
m_Toolbar->AddSeparator();
|
||||
|
||||
m_addr_txtctrl = new wxTextCtrl(m_Toolbar, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
@@ -60,8 +60,8 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||
m_Toolbar->AddControl(m_addr_txtctrl);
|
||||
m_Toolbar->Realize();
|
||||
|
||||
m_SymbolList =
|
||||
new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(140, 100), 0, nullptr, wxLB_SORT);
|
||||
m_SymbolList = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxDLG_UNIT(this, wxSize(100, 80)),
|
||||
0, nullptr, wxLB_SORT);
|
||||
m_SymbolList->Bind(wxEVT_LISTBOX, &DSPDebuggerLLE::OnSymbolListChange, this);
|
||||
|
||||
m_MainNotebook = new wxAuiNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
|
||||
@@ -71,15 +71,14 @@ DSPDebuggerLLE::DSPDebuggerLLE(wxWindow* parent, wxWindowID id)
|
||||
wxBoxSizer* code_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
m_CodeView = new CCodeView(&debug_interface, &DSPSymbols::g_dsp_symbol_db, code_panel);
|
||||
m_CodeView->SetPlain();
|
||||
code_sizer->Add(m_CodeView, 1, wxALL | wxEXPAND);
|
||||
code_sizer->Add(m_CodeView, 1, wxEXPAND);
|
||||
code_panel->SetSizer(code_sizer);
|
||||
m_MainNotebook->AddPage(code_panel, _("Disassembly"), true);
|
||||
|
||||
wxPanel* mem_panel = new wxPanel(m_MainNotebook, wxID_ANY);
|
||||
wxBoxSizer* mem_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
// TODO insert memViewer class
|
||||
m_MemView = new CMemoryView(&debug_interface, mem_panel);
|
||||
mem_sizer->Add(m_MemView, 1, wxALL | wxEXPAND);
|
||||
mem_sizer->Add(m_MemView, 1, wxEXPAND);
|
||||
mem_panel->SetSizer(mem_sizer);
|
||||
m_MainNotebook->AddPage(mem_panel, _("Memory"));
|
||||
|
||||
@@ -111,11 +110,6 @@ DSPDebuggerLLE::~DSPDebuggerLLE()
|
||||
m_DebuggerFrame = nullptr;
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
|
||||
{
|
||||
if (DSPCore_GetState() == DSPCORE_STOP)
|
||||
@@ -134,7 +128,7 @@ void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
|
||||
if (DSPCore_GetState() == DSPCORE_STEPPING)
|
||||
{
|
||||
DSPCore_Step();
|
||||
Update();
|
||||
Repopulate();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -149,24 +143,24 @@ void DSPDebuggerLLE::OnChangeState(wxCommandEvent& event)
|
||||
|
||||
void Host_RefreshDSPDebuggerWindow()
|
||||
{
|
||||
// FIXME: This should use QueueEvent to post the update request to the UI thread.
|
||||
// Need to check if this can safely be performed asynchronously or if it races.
|
||||
// FIXME: This probably belongs in Main.cpp with the other host functions.
|
||||
// NOTE: The DSP never tells us when it shuts down. It probably should.
|
||||
if (m_DebuggerFrame)
|
||||
m_DebuggerFrame->Update();
|
||||
m_DebuggerFrame->Repopulate();
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::Update()
|
||||
void DSPDebuggerLLE::Repopulate()
|
||||
{
|
||||
#if defined __WXGTK__
|
||||
if (!wxIsMainThread())
|
||||
wxMutexGuiEnter();
|
||||
#endif
|
||||
UpdateSymbolMap();
|
||||
UpdateDisAsmListView();
|
||||
UpdateRegisterFlags();
|
||||
UpdateState();
|
||||
#if defined __WXGTK__
|
||||
if (!wxIsMainThread())
|
||||
wxMutexGuiLeave();
|
||||
#endif
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::FocusOnPC()
|
||||
@@ -180,14 +174,14 @@ void DSPDebuggerLLE::UpdateState()
|
||||
{
|
||||
m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Pause"));
|
||||
m_Toolbar->SetToolBitmap(
|
||||
ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, wxSize(10, 10)));
|
||||
ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_TICK_MARK, wxART_OTHER, m_toolbar_item_size));
|
||||
m_Toolbar->EnableTool(ID_STEPTOOL, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Toolbar->SetToolLabel(ID_RUNTOOL, _("Run"));
|
||||
m_Toolbar->SetToolBitmap(
|
||||
ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_OTHER, wxSize(10, 10)));
|
||||
ID_RUNTOOL, wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_OTHER, m_toolbar_item_size));
|
||||
m_Toolbar->EnableTool(ID_STEPTOOL, true);
|
||||
}
|
||||
m_Toolbar->Realize();
|
||||
@@ -201,7 +195,7 @@ void DSPDebuggerLLE::UpdateDisAsmListView()
|
||||
// show PC
|
||||
FocusOnPC();
|
||||
m_CachedStepCounter = g_dsp.step_counter;
|
||||
m_Regs->Update();
|
||||
m_Regs->Repopulate();
|
||||
}
|
||||
|
||||
void DSPDebuggerLLE::UpdateSymbolMap()
|
||||
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
DSPDebuggerLLE(wxWindow* parent, wxWindowID id = wxID_ANY);
|
||||
virtual ~DSPDebuggerLLE();
|
||||
|
||||
void Update() override;
|
||||
void Repopulate();
|
||||
|
||||
private:
|
||||
enum
|
||||
@@ -52,8 +52,8 @@ private:
|
||||
wxListBox* m_SymbolList;
|
||||
wxTextCtrl* m_addr_txtctrl;
|
||||
wxAuiNotebook* m_MainNotebook;
|
||||
wxSize m_toolbar_item_size;
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnChangeState(wxCommandEvent& event);
|
||||
// void OnRightClick(wxListEvent& event);
|
||||
// void OnDoubleClick(wxListEvent& event);
|
||||
|
||||
@@ -71,7 +71,7 @@ wxGridCellAttr* CDSPRegTable::GetAttr(int row, int col, wxGridCellAttr::wxAttrKi
|
||||
}
|
||||
|
||||
DSPRegisterView::DSPRegisterView(wxWindow* parent, wxWindowID id)
|
||||
: wxGrid(parent, id, wxDefaultPosition, wxSize(130, 120))
|
||||
: wxGrid(parent, id, wxDefaultPosition, wxDLG_UNIT(parent, wxSize(100, 80)))
|
||||
{
|
||||
m_register_table = new CDSPRegTable();
|
||||
|
||||
@@ -83,7 +83,7 @@ DSPRegisterView::DSPRegisterView(wxWindow* parent, wxWindowID id)
|
||||
AutoSizeColumns();
|
||||
}
|
||||
|
||||
void DSPRegisterView::Update()
|
||||
void DSPRegisterView::Repopulate()
|
||||
{
|
||||
m_register_table->UpdateCachedRegs();
|
||||
ForceRefresh();
|
||||
|
||||
@@ -38,7 +38,7 @@ class DSPRegisterView : public wxGrid
|
||||
{
|
||||
public:
|
||||
DSPRegisterView(wxWindow* parent, wxWindowID id = wxID_ANY);
|
||||
void Update() override;
|
||||
void Repopulate();
|
||||
|
||||
private:
|
||||
// Owned by wx. Deleted implicitly upon destruction.
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/textctrl.h>
|
||||
|
||||
#include "Common/CommonFuncs.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
@@ -26,10 +27,6 @@ GFXDebuggerPanel::GFXDebuggerPanel(wxWindow* parent, wxWindowID id, const wxPoin
|
||||
g_pdebugger = this;
|
||||
|
||||
CreateGUIControls();
|
||||
|
||||
Bind(wxEVT_CLOSE_WINDOW, &GFXDebuggerPanel::OnClose, this);
|
||||
|
||||
LoadSettings();
|
||||
}
|
||||
|
||||
GFXDebuggerPanel::~GFXDebuggerPanel()
|
||||
@@ -38,55 +35,6 @@ GFXDebuggerPanel::~GFXDebuggerPanel()
|
||||
GFXDebuggerPauseFlag = false;
|
||||
}
|
||||
|
||||
void GFXDebuggerPanel::OnClose(wxCloseEvent& event)
|
||||
{
|
||||
// save the window position when we hide the window
|
||||
SaveSettings();
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void GFXDebuggerPanel::SaveSettings() const
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
// TODO: make this work when we close the entire program too, currently on total close we get
|
||||
// weird values, perhaps because of some conflict with the rendering window
|
||||
|
||||
// TODO: get the screen resolution and make limits from that
|
||||
if (GetPosition().x < 1000 && GetPosition().y < 1000 && GetSize().GetWidth() < 1000 &&
|
||||
GetSize().GetHeight() < 1000)
|
||||
{
|
||||
IniFile::Section* video_window = file.GetOrCreateSection("VideoWindow");
|
||||
video_window->Set("x", GetPosition().x);
|
||||
video_window->Set("y", GetPosition().y);
|
||||
video_window->Set("w", GetSize().GetWidth());
|
||||
video_window->Set("h", GetSize().GetHeight());
|
||||
}
|
||||
|
||||
file.Save(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
}
|
||||
|
||||
void GFXDebuggerPanel::LoadSettings()
|
||||
{
|
||||
IniFile file;
|
||||
file.Load(File::GetUserPath(F_DEBUGGERCONFIG_IDX));
|
||||
|
||||
int x = 100;
|
||||
int y = 100;
|
||||
int w = 100;
|
||||
int h = 100;
|
||||
|
||||
IniFile::Section* video_window = file.GetOrCreateSection("VideoWindow");
|
||||
video_window->Get("x", &x, GetPosition().x);
|
||||
video_window->Get("y", &y, GetPosition().y);
|
||||
video_window->Get("w", &w, GetSize().GetWidth());
|
||||
video_window->Get("h", &h, GetSize().GetHeight());
|
||||
|
||||
SetSize(x, y, w, h);
|
||||
}
|
||||
|
||||
struct PauseEventMap
|
||||
{
|
||||
PauseEvent event;
|
||||
@@ -118,10 +66,9 @@ void GFXDebuggerPanel::CreateGUIControls()
|
||||
|
||||
{NEXT_ERROR, _("Error")}};
|
||||
pauseEventMap = map;
|
||||
const int numPauseEventMap = sizeof(map) / sizeof(PauseEventMap);
|
||||
static constexpr int numPauseEventMap = ArraySize(map);
|
||||
|
||||
// Basic settings
|
||||
CenterOnParent();
|
||||
const int space3 = FromDIP(3);
|
||||
|
||||
m_pButtonPause = new wxButton(this, wxID_ANY, _("Pause"), wxDefaultPosition, wxDefaultSize, 0,
|
||||
wxDefaultValidator, _("Pause"));
|
||||
@@ -139,10 +86,11 @@ void GFXDebuggerPanel::CreateGUIControls()
|
||||
wxDefaultValidator, _("Continue"));
|
||||
m_pButtonCont->Bind(wxEVT_BUTTON, &GFXDebuggerPanel::OnContButton, this);
|
||||
|
||||
m_pCount = new wxTextCtrl(this, wxID_ANY, "1", wxDefaultPosition, wxSize(50, 25), wxTE_RIGHT,
|
||||
m_pCount = new wxTextCtrl(this, wxID_ANY, "1", wxDefaultPosition, wxDefaultSize, wxTE_RIGHT,
|
||||
wxDefaultValidator, _("Count"));
|
||||
m_pCount->SetMinSize(WxUtils::GetTextWidgetMinSize(m_pCount, 10000));
|
||||
|
||||
m_pPauseAtList = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(100, 25), 0, nullptr, 0,
|
||||
m_pPauseAtList = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, 0,
|
||||
wxDefaultValidator, _("PauseAtList"));
|
||||
for (int i = 0; i < numPauseEventMap; i++)
|
||||
{
|
||||
@@ -180,7 +128,7 @@ void GFXDebuggerPanel::CreateGUIControls()
|
||||
m_pButtonClearPixelShaderCache->Bind(wxEVT_BUTTON,
|
||||
&GFXDebuggerPanel::OnClearPixelShaderCacheButton, this);
|
||||
|
||||
m_pDumpList = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxSize(120, 25), 0, nullptr, 0,
|
||||
m_pDumpList = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, nullptr, 0,
|
||||
wxDefaultValidator, _("DumpList"));
|
||||
m_pDumpList->Insert(_("Pixel Shader"), 0);
|
||||
m_pDumpList->Append(_("Vertex Shader"));
|
||||
@@ -196,31 +144,40 @@ void GFXDebuggerPanel::CreateGUIControls()
|
||||
|
||||
wxBoxSizer* sMain = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
wxStaticBoxSizer* const pFlowCtrlBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Flow Control"));
|
||||
wxBoxSizer* const pPauseAtNextSzr = new wxBoxSizer(wxHORIZONTAL);
|
||||
pFlowCtrlBox->Add(m_pButtonPause);
|
||||
pPauseAtNextSzr->Add(m_pButtonPauseAtNext);
|
||||
pPauseAtNextSzr->Add(m_pCount);
|
||||
pPauseAtNextSzr->Add(m_pPauseAtList);
|
||||
pFlowCtrlBox->Add(pPauseAtNextSzr);
|
||||
pFlowCtrlBox->Add(m_pButtonPauseAtNextFrame);
|
||||
pFlowCtrlBox->Add(m_pButtonCont);
|
||||
pPauseAtNextSzr->Add(m_pCount, 0, wxALIGN_CENTER_VERTICAL);
|
||||
pPauseAtNextSzr->Add(m_pPauseAtList, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space3);
|
||||
|
||||
wxFlexGridSizer* const flow_szr = new wxFlexGridSizer(2, space3, space3);
|
||||
flow_szr->Add(m_pButtonPause, 0, wxEXPAND);
|
||||
flow_szr->AddSpacer(1);
|
||||
flow_szr->Add(m_pButtonPauseAtNext, 0, wxEXPAND);
|
||||
flow_szr->Add(pPauseAtNextSzr, 0, wxEXPAND);
|
||||
flow_szr->Add(m_pButtonPauseAtNextFrame, 0, wxEXPAND);
|
||||
flow_szr->AddSpacer(1);
|
||||
flow_szr->Add(m_pButtonCont, 0, wxEXPAND);
|
||||
flow_szr->AddSpacer(1);
|
||||
|
||||
wxStaticBoxSizer* const pFlowCtrlBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Flow Control"));
|
||||
pFlowCtrlBox->Add(flow_szr, 1, wxEXPAND);
|
||||
|
||||
wxBoxSizer* const pDumpSzr = new wxBoxSizer(wxHORIZONTAL);
|
||||
pDumpSzr->Add(m_pButtonDump, 0, wxALIGN_CENTER_VERTICAL);
|
||||
pDumpSzr->Add(m_pDumpList, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, space3);
|
||||
|
||||
wxGridSizer* const pDbgGrid = new wxGridSizer(2, space3, space3);
|
||||
pDbgGrid->Add(m_pButtonUpdateScreen, 0, wxEXPAND);
|
||||
pDbgGrid->Add(m_pButtonClearScreen, 0, wxEXPAND);
|
||||
pDbgGrid->Add(m_pButtonClearTextureCache, 0, wxEXPAND);
|
||||
pDbgGrid->Add(m_pButtonClearVertexShaderCache, 0, wxEXPAND);
|
||||
pDbgGrid->Add(m_pButtonClearPixelShaderCache, 0, wxEXPAND);
|
||||
|
||||
wxStaticBoxSizer* const pDebugBox = new wxStaticBoxSizer(wxVERTICAL, this, _("Debugging"));
|
||||
wxBoxSizer* const pDumpSzr = new wxBoxSizer(wxHORIZONTAL);
|
||||
pDumpSzr->Add(m_pButtonDump);
|
||||
pDumpSzr->Add(m_pDumpList);
|
||||
pDebugBox->Add(pDumpSzr);
|
||||
wxGridSizer* const pDbgGrid = new wxGridSizer(2, 5, 5);
|
||||
pDbgGrid->Add(m_pButtonUpdateScreen);
|
||||
pDbgGrid->Add(m_pButtonClearScreen);
|
||||
pDbgGrid->Add(m_pButtonClearTextureCache);
|
||||
pDbgGrid->Add(m_pButtonClearVertexShaderCache);
|
||||
pDbgGrid->Add(m_pButtonClearPixelShaderCache);
|
||||
pDebugBox->Add(pDbgGrid);
|
||||
pDebugBox->Add(pDumpSzr, 0, wxEXPAND);
|
||||
pDebugBox->Add(pDbgGrid, 1, wxTOP, space3);
|
||||
|
||||
sMain->Add(pFlowCtrlBox, 0, 0, 5);
|
||||
sMain->Add(pDebugBox, 0, 0, 5);
|
||||
sMain->Add(pFlowCtrlBox);
|
||||
sMain->Add(pDebugBox);
|
||||
SetSizerAndFit(sMain);
|
||||
|
||||
OnContinue();
|
||||
@@ -248,12 +205,6 @@ void GFXDebuggerPanel::OnContinue()
|
||||
m_pButtonClearPixelShaderCache->Disable();
|
||||
}
|
||||
|
||||
// General settings
|
||||
void GFXDebuggerPanel::GeneralSettings(wxCommandEvent& event)
|
||||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
void GFXDebuggerPanel::OnPauseButton(wxCommandEvent& event)
|
||||
{
|
||||
GFXDebuggerPauseFlag = true;
|
||||
|
||||
@@ -20,9 +20,6 @@ public:
|
||||
|
||||
virtual ~GFXDebuggerPanel();
|
||||
|
||||
void SaveSettings() const;
|
||||
void LoadSettings();
|
||||
|
||||
bool bInfoLog;
|
||||
bool bPrimLog;
|
||||
bool bSaveTextures;
|
||||
@@ -49,11 +46,8 @@ private:
|
||||
wxButton* m_pButtonClearPixelShaderCache;
|
||||
wxTextCtrl* m_pCount;
|
||||
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void CreateGUIControls();
|
||||
|
||||
void GeneralSettings(wxCommandEvent& event);
|
||||
|
||||
// These set GFXDebuggerPauseFlag to true (either immediately or once the specified event has
|
||||
// occurred)
|
||||
void OnPauseButton(wxCommandEvent& event);
|
||||
|
||||
@@ -34,7 +34,8 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, cons
|
||||
sizerSplit->Add(x86_box = new wxTextCtrl(this, wxID_ANY, "(x86)", wxDefaultPosition,
|
||||
wxDefaultSize, wxTE_MULTILINE),
|
||||
1, wxEXPAND);
|
||||
sizerBig->Add(block_list = new JitBlockList(this, wxID_ANY, wxDefaultPosition, wxSize(100, 140),
|
||||
sizerBig->Add(block_list = new JitBlockList(this, wxID_ANY, wxDefaultPosition,
|
||||
wxDLG_UNIT(this, wxSize(80, 96)),
|
||||
wxLC_REPORT | wxSUNKEN_BORDER | wxLC_ALIGN_LEFT |
|
||||
wxLC_SINGLE_SEL | wxLC_SORT_ASCENDING),
|
||||
0, wxEXPAND);
|
||||
@@ -43,10 +44,7 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, cons
|
||||
sizerBig->Add(button_refresh = new wxButton(this, wxID_ANY, _("&Refresh")));
|
||||
button_refresh->Bind(wxEVT_BUTTON, &CJitWindow::OnRefresh, this);
|
||||
|
||||
SetSizer(sizerBig);
|
||||
|
||||
sizerSplit->Fit(this);
|
||||
sizerBig->Fit(this);
|
||||
SetSizerAndFit(sizerBig);
|
||||
|
||||
#if defined(_M_X86)
|
||||
m_disassembler.reset(GetNewDisassembler("x86"));
|
||||
@@ -59,7 +57,7 @@ CJitWindow::CJitWindow(wxWindow* parent, wxWindowID id, const wxPoint& pos, cons
|
||||
|
||||
void CJitWindow::OnRefresh(wxCommandEvent& /*event*/)
|
||||
{
|
||||
block_list->Update();
|
||||
block_list->Repopulate();
|
||||
}
|
||||
|
||||
void CJitWindow::ViewAddr(u32 em_address)
|
||||
@@ -135,7 +133,7 @@ void CJitWindow::Compare(u32 em_address)
|
||||
}
|
||||
}
|
||||
|
||||
void CJitWindow::Update()
|
||||
void CJitWindow::Repopulate()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -181,6 +179,6 @@ void JitBlockList::Init()
|
||||
InsertColumn(COLUMN_COST, _("Cost"));
|
||||
}
|
||||
|
||||
void JitBlockList::Update()
|
||||
void JitBlockList::Repopulate()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
JitBlockList(wxWindow* parent, const wxWindowID id, const wxPoint& pos, const wxSize& size,
|
||||
long style);
|
||||
void Init();
|
||||
void Update() override;
|
||||
void Repopulate();
|
||||
};
|
||||
|
||||
class CJitWindow : public wxPanel
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
const wxString& name = _("JIT Block Viewer"));
|
||||
|
||||
void ViewAddr(u32 em_address);
|
||||
void Update() override;
|
||||
void Repopulate();
|
||||
|
||||
private:
|
||||
void OnRefresh(wxCommandEvent& /*event*/);
|
||||
|
||||
@@ -22,6 +22,8 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow* parent)
|
||||
Bind(wxEVT_BUTTON, &MemoryCheckDlg::OnOK, this, wxID_OK);
|
||||
Bind(wxEVT_RADIOBUTTON, &MemoryCheckDlg::OnRadioButtonClick, this);
|
||||
|
||||
const int space5 = FromDIP(5);
|
||||
|
||||
m_textAddress = new wxStaticText(this, wxID_ANY, _("Address"));
|
||||
m_textStartAddress = new wxStaticText(this, wxID_ANY, _("Start"));
|
||||
m_textStartAddress->Disable();
|
||||
@@ -46,14 +48,22 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow* parent)
|
||||
m_radioBreakLog->SetValue(true);
|
||||
|
||||
auto* sAddressBox = new wxBoxSizer(wxHORIZONTAL);
|
||||
sAddressBox->Add(m_textAddress, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sAddressBox->Add(m_pEditAddress, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 10);
|
||||
sAddressBox->AddSpacer(space5);
|
||||
sAddressBox->Add(m_textAddress, 0, wxALIGN_CENTER_VERTICAL);
|
||||
sAddressBox->AddSpacer(space5);
|
||||
sAddressBox->Add(m_pEditAddress, 1, wxALIGN_CENTER_VERTICAL);
|
||||
sAddressBox->AddSpacer(space5);
|
||||
|
||||
auto* sAddressRangeBox = new wxBoxSizer(wxHORIZONTAL);
|
||||
sAddressRangeBox->Add(m_textStartAddress, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sAddressRangeBox->Add(m_pEditStartAddress, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 10);
|
||||
sAddressRangeBox->Add(m_textEndAddress, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
sAddressRangeBox->Add(m_pEditEndAddress, 1, wxALIGN_CENTER_VERTICAL | wxTOP | wxBOTTOM, 5);
|
||||
sAddressRangeBox->AddSpacer(space5);
|
||||
sAddressRangeBox->Add(m_textStartAddress, 0, wxALIGN_CENTER_VERTICAL);
|
||||
sAddressRangeBox->AddSpacer(space5);
|
||||
sAddressRangeBox->Add(m_pEditStartAddress, 1, wxALIGN_CENTER_VERTICAL);
|
||||
sAddressRangeBox->AddSpacer(space5);
|
||||
sAddressRangeBox->Add(m_textEndAddress, 0, wxALIGN_CENTER_VERTICAL);
|
||||
sAddressRangeBox->AddSpacer(space5);
|
||||
sAddressRangeBox->Add(m_pEditEndAddress, 1, wxALIGN_CENTER_VERTICAL);
|
||||
sAddressRangeBox->AddSpacer(space5);
|
||||
|
||||
auto* sActions = new wxStaticBoxSizer(wxVERTICAL, this, _("Action"));
|
||||
sActions->Add(m_radioRead, 0, wxEXPAND);
|
||||
@@ -67,19 +77,26 @@ MemoryCheckDlg::MemoryCheckDlg(CBreakPointWindow* parent)
|
||||
sFlags->Add(m_radioBreakLog);
|
||||
|
||||
auto* sOptionsBox = new wxBoxSizer(wxHORIZONTAL);
|
||||
sOptionsBox->Add(sActions, 1, wxEXPAND | wxRIGHT | wxTOP | wxBOTTOM, 5);
|
||||
sOptionsBox->Add(sFlags, 1, wxEXPAND | wxLEFT | wxTOP | wxBOTTOM, 5);
|
||||
sOptionsBox->Add(sActions, 1, wxEXPAND, space5);
|
||||
sOptionsBox->Add(sFlags, 1, wxEXPAND | wxLEFT, space5);
|
||||
|
||||
auto* sControls = new wxBoxSizer(wxVERTICAL);
|
||||
sControls->Add(m_radioAddress, 0, wxEXPAND);
|
||||
sControls->AddSpacer(5);
|
||||
sControls->Add(sAddressBox, 0, wxEXPAND);
|
||||
sControls->AddSpacer(5);
|
||||
sControls->Add(m_radioRange, 0, wxEXPAND);
|
||||
sControls->AddSpacer(5);
|
||||
sControls->Add(sAddressRangeBox, 0, wxEXPAND);
|
||||
sControls->AddSpacer(5);
|
||||
sControls->Add(sOptionsBox, 0, wxEXPAND);
|
||||
|
||||
auto* sMainSizer = new wxBoxSizer(wxVERTICAL);
|
||||
sMainSizer->Add(sControls, 0, wxEXPAND | wxTOP | wxRIGHT | wxLEFT, 5);
|
||||
sMainSizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
sMainSizer->AddSpacer(space5);
|
||||
sMainSizer->Add(sControls, 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
sMainSizer->AddSpacer(space5);
|
||||
sMainSizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxLEFT | wxRIGHT, space5);
|
||||
sMainSizer->AddSpacer(space5);
|
||||
|
||||
SetSizerAndFit(sMainSizer);
|
||||
SetFocus();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user