From f8586fd063bbed0c6b55d805b409516e42dd6669 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 7 Nov 2023 22:11:15 +1100 Subject: [PATCH] [host] dxgi: fix RGB24 damage rect rounding bug --- host/platform/Windows/capture/DXGI/src/dxgi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index d5cbef76..6343a52f 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -1453,7 +1453,7 @@ static CaptureResult dxgi_getFrame(FrameBuffer * frame, int frameIndex) int originalX = rect.x; int scaledX = originalX * 3 / 4; rect.x = scaledX; - rect.width = ((originalX + rect.width) * 3 / 4) - scaledX; + rect.width = (((originalX + rect.width) * 3 + 3) / 4) - scaledX; scaledDamageRects[i] = rect; }