mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 22:01:46 +00:00
[client] x11: protect against msc overflow with jitRender
This commit is contained in:
parent
02b59ba8f7
commit
27c7054505
1 changed files with 10 additions and 1 deletions
|
@ -117,7 +117,16 @@ static void x11DoPresent(uint64_t msc)
|
||||||
|
|
||||||
uint64_t refill;
|
uint64_t refill;
|
||||||
if (!first)
|
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
|
else
|
||||||
{
|
{
|
||||||
refill = 50;
|
refill = 50;
|
||||||
|
|
Loading…
Reference in a new issue