[client] reset the frame time when we get a frame signal

This stops a duplicate frame rendering bug due to failure to discipline
based on the signal timing.
This commit is contained in:
Geoffrey McRae 2020-08-09 15:55:12 +10:00
parent fb9b772db0
commit 1899d9f1da
2 changed files with 10 additions and 2 deletions

View File

@ -1 +1 @@
B2-rc2-29-g302b988524+1 B2-rc2-30-gfb9b772db0+1

View File

@ -213,7 +213,15 @@ static int renderThread(void * unused)
if (atomic_fetch_sub_explicit(&a_framesPending, 1, memory_order_release) > 1) if (atomic_fetch_sub_explicit(&a_framesPending, 1, memory_order_release) > 1)
continue; continue;
lgWaitEventAbs(e_frame, &time); if (lgWaitEventAbs(e_frame, &time))
{
if (state.frameTime > 0)
{
resyncCheck = 0;
clock_gettime(CLOCK_REALTIME, &time);
tsAdd(&time, state.frameTime);
}
}
} }
} }