mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 12:05:23 +00:00
Debugger: Simplify thread pause state change
This commit is contained in:
parent
b56bc7e087
commit
0bb3609cad
1 changed files with 6 additions and 9 deletions
|
@ -136,16 +136,13 @@ debugger_frame::debugger_frame(std::shared_ptr<gui_settings> settings, QWidget *
|
|||
{
|
||||
if (const auto cpu = this->cpu.lock())
|
||||
{
|
||||
if (m_btn_run->text() == RunString && cpu->state.test_and_reset(cpu_flag::dbg_pause))
|
||||
// Alter dbg_pause bit state (disable->enable, enable->disable)
|
||||
const auto old = cpu->state.xor_fetch(cpu_flag::dbg_pause);
|
||||
|
||||
// Notify only if no pause flags are set after this change
|
||||
if (!(old & (cpu_flag::dbg_pause + cpu_flag::dbg_global_pause)))
|
||||
{
|
||||
if (!(cpu->state & (cpu_flag::dbg_pause + cpu_flag::dbg_global_pause)))
|
||||
{
|
||||
cpu->notify();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cpu->state += cpu_flag::dbg_pause;
|
||||
cpu->notify();
|
||||
}
|
||||
}
|
||||
UpdateUI();
|
||||
|
|
Loading…
Add table
Reference in a new issue