LV2: Minor optimization regarding signal flag

This commit is contained in:
Eladash 2022-07-21 16:53:49 +03:00 committed by Ivan
parent dc851a729e
commit 2eebbd307d
11 changed files with 24 additions and 26 deletions

View file

@ -451,9 +451,9 @@ error_code sys_event_queue_receive(ppu_thread& ppu, u32 equeue_id, vm::ptr<sys_e
}
// If cancelled, gpr[3] will be non-zero. Other registers must contain event data.
while (auto state = ppu.state.fetch_sub(cpu_flag::signal))
while (auto state = +ppu.state)
{
if (state & cpu_flag::signal)
if (state & cpu_flag::signal && ppu.state.test_and_reset(cpu_flag::signal))
{
break;
}