diff options
| author | Sepalani <sepalani@hotmail.fr> | 2021-02-17 21:02:23 +0400 |
|---|---|---|
| committer | Sepalani <sepalani@hotmail.fr> | 2021-02-17 21:25:29 +0400 |
| commit | bbcaede389929300ddc136d7a2f8383e4c773fe8 (patch) | |
| tree | f482d60759b6cb4f5484a94ab27b880fc6670e1c /Source/Core/DolphinQt/Debugger/RegisterWidget.cpp | |
| parent | 9d94a31eaea8ba5fee1f27816162fe1a291a0a4c (diff) | |
RegisterWidget: Fix add to watch action
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/RegisterWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/RegisterWidget.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp b/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp index 2cda7fc1e2..bf6a7ac0e7 100644 --- a/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/RegisterWidget.cpp @@ -125,7 +125,12 @@ void RegisterWidget::ShowContextMenu() // i18n: This kind of "watch" is used for watching emulated memory. // It's not related to timekeeping devices. - menu->addAction(tr("Add to &watch"), this, + menu->addAction(tr("Add to &watch"), this, [this, item] { + const u32 address = item->GetValue(); + const QString name = QStringLiteral("reg_%1").arg(address, 8, 16, QLatin1Char('0')); + emit RequestWatch(name, address); + }); + menu->addAction(tr("Add memory &breakpoint"), this, [this, item] { emit RequestMemoryBreakpoint(item->GetValue()); }); menu->addAction(tr("View &memory"), this, [this, item] { emit RequestViewInMemory(item->GetValue()); }); |
