mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-31 01:59:52 -06:00
Merge pull request #13446 from JosJuice/breakpoints-delayed-update
PowerPC: Add RAII handling for breakpoint updates
This commit is contained in:
@ -1010,6 +1010,7 @@ void MemoryViewWidget::ToggleBreakpoint(u32 addr, bool row)
|
||||
|
||||
{
|
||||
const Core::CPUThreadGuard guard(m_system);
|
||||
DelayedMemCheckUpdate delayed_update(&memchecks);
|
||||
|
||||
for (int i = 0; i < breaks; i++)
|
||||
{
|
||||
@ -1028,16 +1029,14 @@ void MemoryViewWidget::ToggleBreakpoint(u32 addr, bool row)
|
||||
check.log_on_hit = m_do_log;
|
||||
check.break_on_hit = true;
|
||||
|
||||
memchecks.Add(std::move(check), false);
|
||||
delayed_update |= memchecks.Add(std::move(check));
|
||||
}
|
||||
else if (check_ptr != nullptr)
|
||||
{
|
||||
// Using the pointer fixes misaligned breakpoints (0x11 breakpoint in 0x10 aligned view).
|
||||
memchecks.Remove(check_ptr->start_address, false);
|
||||
delayed_update |= memchecks.Remove(check_ptr->start_address);
|
||||
}
|
||||
}
|
||||
|
||||
memchecks.Update();
|
||||
}
|
||||
|
||||
emit Host::GetInstance()->PPCBreakpointsChanged();
|
||||
|
Reference in New Issue
Block a user