mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-19 07:21:40 +00:00
CodeWidget: Add button that prevents automatic updates to the address, such as navigating to the PC on pause.
This commit is contained in:
parent
43aa7e9b96
commit
d53e766d65
4 changed files with 25 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue