From b0b851dd4b09bf617feb7374bad8f430ef21f508 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 5 Feb 2024 04:20:38 +1100 Subject: [PATCH] [host] d12: fix incorrect format presented to extra clients --- host/platform/Windows/capture/D12/d12.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/host/platform/Windows/capture/D12/d12.c b/host/platform/Windows/capture/D12/d12.c index 5bf70736..c8427315 100644 --- a/host/platform/Windows/capture/D12/d12.c +++ b/host/platform/Windows/capture/D12/d12.c @@ -372,13 +372,15 @@ static CaptureResult d12_waitFrame(unsigned frameBufferIndex, D3D12_RESOURCE_DESC srcFormat = ID3D12Resource_GetDesc(*src); - D3D12_RESOURCE_DESC dstFormat = srcFormat; + D3D12_RESOURCE_DESC dstFormat = this->dstFormat; // if the input format changed, reconfigure the effects - if (dstFormat.Width != this->captureFormat.Width || + if (dstFormat.Width == 0 || + dstFormat.Width != this->captureFormat.Width || dstFormat.Height != this->captureFormat.Height || dstFormat.Format != this->captureFormat.Format) { + dstFormat = srcFormat; this->captureFormat = dstFormat; //TODO: loop through an effect array