From 1f34db5039e532833aa740376addf11e9c25104a Mon Sep 17 00:00:00 2001 From: Soreepeong Date: Thu, 25 Jul 2024 19:05:59 +0900 Subject: [PATCH] Do not handle DXGI_PRESENT_TEST --- Dalamud/Interface/Internal/InterfaceManager.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dalamud/Interface/Internal/InterfaceManager.cs b/Dalamud/Interface/Internal/InterfaceManager.cs index 45cba5c76..79fe41046 100644 --- a/Dalamud/Interface/Internal/InterfaceManager.cs +++ b/Dalamud/Interface/Internal/InterfaceManager.cs @@ -498,8 +498,14 @@ internal partial class InterfaceManager : IInternalDisposableService /// The swap chain to test and initialize ImGui with if conditions are met. /// An initialized instance of , or null if /// is not the main swap chain. - private unsafe RawDX11Scene? RenderDalamudCheckAndInitialize(IDXGISwapChain* swapChain) + private unsafe RawDX11Scene? RenderDalamudCheckAndInitialize(IDXGISwapChain* swapChain, uint flags) { + // Quoting ReShade dxgi_swapchain.cpp DXGISwapChain::on_present: + // > Some D3D11 games test presentation for timing and composition purposes + // > These calls are not rendering related, but rather a status request for the D3D runtime and as such should be ignored + if ((flags & DXGI.DXGI_PRESENT_TEST) != 0) + return null; + if (!SwapChainHelper.IsGameDeviceSwapChain(swapChain)) return null;