From 2518208c5c56b41c5306e13bb1a61257c36a779d Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 5 Feb 2022 19:32:05 -0600 Subject: [PATCH] Don't set fullScreenDesc fields to prevent entering "proxy" full-screen mode --- app/streaming/video/ffmpeg-renderers/d3d11va.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp index 7f8c1deb..c4b849cd 100644 --- a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp +++ b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp @@ -257,12 +257,14 @@ bool D3D11VARenderer::initialize(PDECODER_PARAMETERS params) swapChainDesc.Width = sdlMode.w; swapChainDesc.Height = sdlMode.h; - // FIXME: The SDL referesh rate may not match the actual mode due to truncation - fullScreenDesc.RefreshRate.Numerator = sdlMode.refresh_rate; - fullScreenDesc.RefreshRate.Denominator = 1; - + // Leave these unspecified to ensure we don't end up in an inefficient "proxy" + // full-screen swapchain with DXGI doing format conversion behind our backs. + // https://youtu.be/E3wTajGZOsA?t=1489 + fullScreenDesc.RefreshRate.Numerator = 0; + fullScreenDesc.RefreshRate.Denominator = 0; fullScreenDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; fullScreenDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; + fullScreenDesc.Windowed = FALSE; }