diff options
| author | TryTwo <taolas@gmail.com> | 2025-07-09 23:00:00 -0700 |
|---|---|---|
| committer | TryTwo <taolas@gmail.com> | 2025-07-15 12:23:47 -0700 |
| commit | d53e766d6595d8cdd74f1f8316c82f7fa9e7bb3e (patch) | |
| tree | a19e3c8334d839bb065eec31801e4bc2592fa54c /Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | |
| parent | 43aa7e9b9658d3c1508512b6b0caef7737ed6683 (diff) | |
CodeWidget: Add button that prevents automatic updates to the address, such as navigating to the PC on pause.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp index e555054938..a430be15a3 100644 --- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp @@ -181,11 +181,13 @@ CodeViewWidget::CodeViewWidget() &CodeViewWidget::OnDebugFontChanged); connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this] { - m_address = m_system.GetPPCState().pc; + if (!m_lock_address && Core::GetState(m_system) == Core::State::Paused) + m_address = m_system.GetPPCState().pc; Update(); }); connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, [this] { - m_address = m_system.GetPPCState().pc; + if (!m_lock_address && Core::GetState(m_system) == Core::State::Paused) + m_address = m_system.GetPPCState().pc; Update(); }); connect(Host::GetInstance(), &Host::PPCSymbolsChanged, this, @@ -538,6 +540,11 @@ u32 CodeViewWidget::GetAddress() const return m_address; } +void CodeViewWidget::OnLockAddress(bool lock) +{ + m_lock_address = lock; +} + void CodeViewWidget::SetAddress(u32 address, SetAddressUpdate update) { if (m_address == address) |
