mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[host] dxgi: correctly count moved rectangles
This commit is contained in:
parent
8c18817e2d
commit
566c89e9d8
@ -757,6 +757,7 @@ static void computeFrameDamage(Texture * tex)
|
||||
dirtyRect++)
|
||||
rectToFrameDamageRect(dirtyRect, texDamageRect++);
|
||||
|
||||
int actuallyMovedRectsCount = 0;
|
||||
for (DXGI_OUTDUPL_MOVE_RECT *moveRect = moveRects;
|
||||
moveRect < moveRects + moveRectsCount;
|
||||
moveRect++)
|
||||
@ -767,7 +768,7 @@ static void computeFrameDamage(Texture * tex)
|
||||
moveRect->SourcePoint.y == moveRect->DestinationRect.top)
|
||||
continue;
|
||||
|
||||
*(texDamageRect++) = (FrameDamageRect)
|
||||
*texDamageRect++ = (FrameDamageRect)
|
||||
{
|
||||
.x = moveRect->SourcePoint.x,
|
||||
.y = moveRect->SourcePoint.y,
|
||||
@ -776,9 +777,10 @@ static void computeFrameDamage(Texture * tex)
|
||||
};
|
||||
|
||||
rectToFrameDamageRect(&moveRect->DestinationRect, texDamageRect++);
|
||||
actuallyMovedRectsCount += 2;
|
||||
}
|
||||
|
||||
tex->damageRectsCount = dirtyRectsCount + moveRectsCount;
|
||||
tex->damageRectsCount = dirtyRectsCount + actuallyMovedRectsCount;
|
||||
}
|
||||
|
||||
static CaptureResult dxgi_capture(void)
|
||||
|
Loading…
Reference in New Issue
Block a user