mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-03 11:17:10 +00:00
[host] dxgi: use FAILED macro instead of comparing against S_OK
This commit is contained in:
parent
d3ea9662bf
commit
acd5ce51db
1 changed files with 4 additions and 4 deletions
|
@ -729,9 +729,9 @@ static void computeFrameDamage(Texture * tex)
|
||||||
// Compute dirty rectangles.
|
// Compute dirty rectangles.
|
||||||
RECT dirtyRects[maxDamageRectsCount];
|
RECT dirtyRects[maxDamageRectsCount];
|
||||||
UINT dirtyRectsBufferSizeRequired;
|
UINT dirtyRectsBufferSizeRequired;
|
||||||
if (IDXGIOutputDuplication_GetFrameDirtyRects(this->dup,
|
if (FAILED(IDXGIOutputDuplication_GetFrameDirtyRects(this->dup,
|
||||||
ARRAY_LENGTH(dirtyRects), dirtyRects,
|
ARRAY_LENGTH(dirtyRects), dirtyRects,
|
||||||
&dirtyRectsBufferSizeRequired) != S_OK)
|
&dirtyRectsBufferSizeRequired)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int dirtyRectsCount = dirtyRectsBufferSizeRequired / sizeof(*dirtyRects);
|
const int dirtyRectsCount = dirtyRectsBufferSizeRequired / sizeof(*dirtyRects);
|
||||||
|
@ -744,9 +744,9 @@ static void computeFrameDamage(Texture * tex)
|
||||||
// Divide by two here since each move generates two dirty regions.
|
// Divide by two here since each move generates two dirty regions.
|
||||||
DXGI_OUTDUPL_MOVE_RECT moveRects[(maxDamageRectsCount - dirtyRectsCount) / 2];
|
DXGI_OUTDUPL_MOVE_RECT moveRects[(maxDamageRectsCount - dirtyRectsCount) / 2];
|
||||||
UINT moveRectsBufferSizeRequired;
|
UINT moveRectsBufferSizeRequired;
|
||||||
if (IDXGIOutputDuplication_GetFrameMoveRects(this->dup,
|
if (FAILED(IDXGIOutputDuplication_GetFrameMoveRects(this->dup,
|
||||||
ARRAY_LENGTH(moveRects), moveRects,
|
ARRAY_LENGTH(moveRects), moveRects,
|
||||||
&moveRectsBufferSizeRequired) != S_OK)
|
&moveRectsBufferSizeRequired)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const int moveRectsCount = moveRectsBufferSizeRequired / sizeof(*moveRects);
|
const int moveRectsCount = moveRectsBufferSizeRequired / sizeof(*moveRects);
|
||||||
|
|
Loading…
Reference in a new issue