summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2023-01-27 19:06:30 +0100
committerGitHub <noreply@github.com>2023-01-27 19:06:30 +0100
commit41272dc5f1b62f4a5a0562cc29eb3e83367d0f14 (patch)
tree6691a9e37d870d1d2879d14faa41d4c0ee041b37 /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
parentf056cec8594ca63049ae3b481a5f2f8a752ef03d (diff)
parentbe2d394b8ca128e012ef4ba972559140276a1428 (diff)
Merge pull request #11429 from AdmiralCurtiss/globals-ppc
Reduce usage of ppcState global.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
index 77d73a8eff..b4cfcb19eb 100644
--- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
+++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp
@@ -167,11 +167,11 @@ CodeViewWidget::CodeViewWidget()
&CodeViewWidget::FontBasedSizing);
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this] {
- m_address = PC;
+ m_address = PowerPC::ppcState.pc;
Update();
});
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, [this] {
- m_address = PC;
+ m_address = PowerPC::ppcState.pc;
Update();
});
@@ -567,9 +567,9 @@ void CodeViewWidget::OnContextMenu()
menu->addAction(tr("Restore instruction"), this, &CodeViewWidget::OnRestoreInstruction);
QString target;
- if (addr == PC && running && Core::GetState() == Core::State::Paused)
+ if (addr == PowerPC::ppcState.pc && running && Core::GetState() == Core::State::Paused)
{
- const std::string line = PowerPC::debug_interface.Disassemble(PC);
+ const std::string line = PowerPC::debug_interface.Disassemble(PowerPC::ppcState.pc);
const auto target_it = std::find(line.begin(), line.end(), '\t');
const auto target_end = std::find(target_it, line.end(), ',');