Do not handle DXGI_PRESENT_TEST

This commit is contained in:
Soreepeong 2024-07-25 19:05:59 +09:00
parent ebee2f151e
commit 1f34db5039

View file

@ -498,8 +498,14 @@ internal partial class InterfaceManager : IInternalDisposableService
/// <param name="swapChain">The swap chain to test and initialize ImGui with if conditions are met.</param>
/// <returns>An initialized instance of <see cref="RawDX11Scene"/>, or <c>null</c> if <paramref name="swapChain"/>
/// is not the main swap chain.</returns>
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;