CHECK_EMU_STATUS, autojoin_thread_t

This commit is contained in:
Nekotekina 2015-07-04 02:22:24 +03:00
parent 8f9e1100c8
commit 3064cf8101
28 changed files with 145 additions and 179 deletions

View file

@ -2456,14 +2456,16 @@ void RSXThread::Task()
m_last_flip_time = get_system_time() - 1000000;
thread_t vblank(WRAP_EXPR("VBlank thread"), [this]()
autojoin_thread_t vblank(WRAP_EXPR("VBlank Thread"), [this]()
{
const u64 start_time = get_system_time();
m_vblank_count = 0;
while (joinable() && !Emu.IsStopped())
while (joinable())
{
CHECK_EMU_STATUS;
if (get_system_time() - start_time > m_vblank_count * 1000000 / 60)
{
m_vblank_count++;
@ -2567,8 +2569,6 @@ void RSXThread::Task()
});
}
LOG_NOTICE(RSX, "RSX thread ended");
OnExitThread();
}