mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[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:
parent
fb9b772db0
commit
1899d9f1da
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user