diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2019-04-28 00:32:36 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-28 00:32:36 +0200 |
| commit | 906ccdb1b43345d26f8065e537be0adbf811e0bf (patch) | |
| tree | 1b10b8c629acc14577eedd5c52452001d9ffbe3d /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | |
| parent | 347f22e91a878c08d1b154fe30762a16fe970ab9 (diff) | |
| parent | f6e73a0aec93e0dc2d500c89d97150d9f5c42c35 (diff) | |
Merge pull request #8030 from spycrab/qt_patch_preview
Qt/Debugger: Implement patch instruction preview
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp index 295902d264..71518a2dda 100644 --- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp @@ -26,6 +26,7 @@ #include "Core/PowerPC/PPCAnalyst.h" #include "Core/PowerPC/PPCSymbolDB.h" #include "Core/PowerPC/PowerPC.h" +#include "DolphinQt/Debugger/PatchInstructionDialog.h" #include "DolphinQt/Resources.h" #include "DolphinQt/Settings.h" @@ -463,17 +464,12 @@ void CodeViewWidget::OnReplaceInstruction() if (!read_result.valid) return; - bool good; - QString name = QInputDialog::getText( - this, tr("Change instruction"), tr("New instruction:"), QLineEdit::Normal, - QStringLiteral("%1").arg(read_result.hex, 8, 16, QLatin1Char('0')), &good); - - u32 code = name.toUInt(&good, 16); + PatchInstructionDialog dialog(this, addr, PowerPC::debug_interface.ReadInstruction(addr)); - if (good) + if (dialog.exec() == QDialog::Accepted) { PowerPC::debug_interface.UnsetPatch(addr); - PowerPC::debug_interface.SetPatch(addr, code); + PowerPC::debug_interface.SetPatch(addr, dialog.GetCode()); Update(); } } |
