Add options for BreakpointWidget, WatchWidget, and CheatSearches to send address to Memory Widget

This commit is contained in:
TryTwo
2022-05-27 17:34:47 -07:00
parent 70bf89fa59
commit 177dae6a1a
9 changed files with 25 additions and 4 deletions

View File

@ -310,6 +310,7 @@ void WatchWidget::ShowContextMenu()
if (row >= 0)
{
menu->addAction(tr("Show in Memory"), this, [this, row] { ShowInMemory(row); });
// i18n: This kind of "watch" is used for watching emulated memory.
// It's not related to timekeeping devices.
menu->addAction(tr("&Delete Watch"), this, [this, row] { DeleteWatch(row); });
@ -395,6 +396,11 @@ void WatchWidget::AddWatchBreakpoint(int row)
emit RequestMemoryBreakpoint(PowerPC::debug_interface.GetWatch(row).address);
}
void WatchWidget::ShowInMemory(int row)
{
emit ShowMemory(PowerPC::debug_interface.GetWatch(row).address);
}
void WatchWidget::AddWatch(QString name, u32 addr)
{
PowerPC::debug_interface.SetWatch(addr, name.toStdString());