[host] dxgi: fix frame damage method parameters

The buffer input sizes to the `IDXGIOutputDuplication` methods are measured
in bytes. This dramatically increases the number of dirty/move rects that
can be handled.
This commit is contained in:
Chris Spencer authored and Geoffrey McRae committed 2022-01-13 09:34:14 +11:00
1 parent 786a252b23
commit 3d0a8f6987
1 file changed
+2 -2
@@ -694,7 +694,7 @@ static void computeFrameDamage(Texture * tex)
RECT dirtyRects[maxDamageRectsCount];
UINT dirtyRectsBufferSizeRequired;
if (FAILED(IDXGIOutputDuplication_GetFrameDirtyRects(this->dup,
ARRAY_LENGTH(dirtyRects), dirtyRects,
sizeof(dirtyRects), dirtyRects,
&dirtyRectsBufferSizeRequired)))
return;
@@ -709,7 +709,7 @@ static void computeFrameDamage(Texture * tex)
DXGI_OUTDUPL_MOVE_RECT moveRects[(maxDamageRectsCount - dirtyRectsCount) / 2];
UINT moveRectsBufferSizeRequired;
if (FAILED(IDXGIOutputDuplication_GetFrameMoveRects(this->dup,
ARRAY_LENGTH(moveRects), moveRects,
sizeof(moveRects), moveRects,
&moveRectsBufferSizeRequired)))
return;