mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-10 08:38:20 +00:00
[client] x11: protect against msc overflow with jitRender
This commit is contained in:
parent
02b59ba8f7
commit
27c7054505
@ -117,7 +117,16 @@ static void x11DoPresent(uint64_t msc)
|
||||
|
||||
uint64_t refill;
|
||||
if (!first)
|
||||
refill = 50 - (lastMsc - msc);
|
||||
{
|
||||
const uint64_t delta = (lastMsc >= msc) ?
|
||||
lastMsc - msc :
|
||||
~0ULL - msc + lastMsc;
|
||||
|
||||
if (delta > 50)
|
||||
return;
|
||||
|
||||
refill = 50 - delta;
|
||||
}
|
||||
else
|
||||
{
|
||||
refill = 50;
|
||||
|
Loading…
Reference in New Issue
Block a user