Replace some uses of Emu.IsStopped()

Poll thread state instead.
This commit is contained in:
Nekotekina 2019-10-12 21:12:47 +03:00
parent 9ae08946ac
commit 16dd72b3e3
7 changed files with 12 additions and 12 deletions

View file

@ -180,7 +180,7 @@ struct vdec_context final
{
ppu_tid = ppu.id;
for (auto cmds = in_cmd.pop_all(); !Emu.IsStopped(); cmds ? cmds.pop_front() : cmds = in_cmd.pop_all())
for (auto cmds = in_cmd.pop_all(); thread_ctrl::state() != thread_state::aborting; cmds ? cmds.pop_front() : cmds = in_cmd.pop_all())
{
if (!cmds)
{
@ -394,7 +394,7 @@ struct vdec_context final
au_count--;
}
while (!Emu.IsStopped() && out_max && (std::lock_guard{mutex}, out.size() > out_max))
while (thread_ctrl::state() != thread_state::aborting && out_max && (std::lock_guard{mutex}, out.size() > out_max))
{
thread_ctrl::wait_for(1000);
}