From a391e271c3ba3529fc505647aa83a28b8475af87 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sat, 8 Jan 2022 23:57:20 -0500 Subject: [PATCH] [host] dxgi: damage all textures when skipping frame --- host/platform/Windows/capture/DXGI/src/dxgi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index c0d29dd6..8ce8a17f 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -858,6 +858,13 @@ static CaptureResult dxgi_capture(void) return CAPTURE_RESULT_ERROR; } } + else + { + // If we are skipping the frame, then we lose track of the damage, + // and must invalidate all the textures. + for (int i = 0; i < this->maxTextures; ++i) + this->texture[i].texDamageCount = -1; + } } IDXGIResource_Release(res);