summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2021-02-19 01:30:14 +0100
committerGitHub <noreply@github.com>2021-02-19 01:30:14 +0100
commit34c9e0dece538acab1eaf8cb7ab4d41dab98c5e0 (patch)
tree45df63144af1b772454749fcea48cfc37d0a8978 /Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp
parent5e79b6acb7bc8825ce71b842d01999f5d341caa6 (diff)
parente3d85ffe35ffac253cdae5b08c50c33a17db9ce3 (diff)
Merge pull request #9521 from sepalani/watches
Debugger: Fix "Add to watch" not working
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp
index 60d32a8a25..5db9fdfbd9 100644
--- a/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/MemoryViewWidget.cpp
@@ -403,6 +403,11 @@ void MemoryViewWidget::OnContextMenu()
menu->addSeparator();
+ menu->addAction(tr("Add to watch"), this, [this] {
+ const u32 address = GetContextAddress();
+ const QString name = QStringLiteral("mem_%1").arg(address, 8, 16, QLatin1Char('0'));
+ emit RequestWatch(name, address);
+ });
menu->addAction(tr("Toggle Breakpoint"), this, &MemoryViewWidget::ToggleBreakpoint);
menu->exec(QCursor::pos());