From 63a5bc5e12d59f2bf83fb7834317ade59061b338 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 15 May 2022 13:38:58 -0500 Subject: [PATCH] Only force pacing in true full-screen mode to be consistent with DXVA2 --- app/streaming/video/ffmpeg-renderers/d3d11va.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp index 81683611..b13ac0ed 100644 --- a/app/streaming/video/ffmpeg-renderers/d3d11va.cpp +++ b/app/streaming/video/ffmpeg-renderers/d3d11va.cpp @@ -1012,10 +1012,11 @@ int D3D11VARenderer::getRendererAttributes() // This renderer supports HDR attributes |= RENDERER_ATTRIBUTE_HDR_SUPPORT; - // This renderer requires frame pacing to synchronize with VBlank when we're - // in full-screen. In windowed mode, we will render as fast we can and DWM - // will grab whatever is latest at the time unless the user opts for pacing. - if (SDL_GetWindowFlags(m_DecoderParams.window) & SDL_WINDOW_FULLSCREEN) { + // This renderer requires frame pacing to synchronize with VBlank when we're in full-screen. + // In windowed mode, we will render as fast we can and DWM will grab whatever is latest at the + // time unless the user opts for pacing. We will use pacing in full-screen mode and normal DWM + // sequencing in full-screen desktop mode to behave similarly to the DXVA2 renderer. + if ((SDL_GetWindowFlags(m_DecoderParams.window) & SDL_WINDOW_FULLSCREEN_DESKTOP) == SDL_WINDOW_FULLSCREEN) { attributes |= RENDERER_ATTRIBUTE_FORCE_PACING; }