Merge pull request #1559 from Kingcom/memview

Debugger: Fix various memory view issues
This commit is contained in:
ramapcsx2 authored and GitHub committed 2016-09-10 16:51:53 +02:00
commit 95063a7b65
2 files changed
+10 -6

No files matched your search

+8 -3
View File
@@ -612,11 +612,11 @@ void CtrlMemView::scrollCursor(int bytes)
if (curAddress < windowStart)
{
windowStart = (curAddress / rowSize) * curAddress;
windowStart = (curAddress / rowSize) * rowSize;
} else if (curAddress >= windowEnd)
{
windowStart = curAddress - (visibleRows - 1)*rowSize;
windowStart = (windowStart / rowSize) * windowStart;
windowStart = (windowStart / rowSize) * rowSize;
}
updateStatusBarText();
@@ -642,7 +642,12 @@ void CtrlMemView::gotoAddress(u32 addr, bool pushInHistory)
curAddress = addr;
selectedNibble = 0;
windowStart = curAddress;
int visibleRows = GetClientSize().y/rowHeight;
u32 windowEnd = windowStart+visibleRows*rowSize;
if (curAddress < windowStart || curAddress >= windowEnd)
windowStart = (curAddress / rowSize) * rowSize;
updateStatusBarText();
redraw();
+2 -3
View File
@@ -502,9 +502,8 @@ void DisassemblyDialog::onDebuggerEvent(wxCommandEvent& evt)
{
currentCpu->showMemoryView();
CtrlMemView *memview = currentCpu->getMemoryView();
memview->gotoAddress(evt.GetInt(), true);
memview->SetFocus();
currentCpu->getMemoryView()->gotoAddress(evt.GetInt(), true);
currentCpu->getDisassembly()->SetFocus();
}
} else if (type == debEVT_RUNTOPOS)
{