This commit is contained in:
Soreepeong 2024-07-25 20:19:22 +09:00
parent 1f34db5039
commit ef64a67d10
3 changed files with 4 additions and 5 deletions

View file

@ -86,7 +86,7 @@ internal unsafe partial class InterfaceManager
// Call this first to draw Dalamud over ReShade.
this.reShadeDxgiSwapChainPresentHook!.Original(swapChain, flags, presentParams);
if (this.RenderDalamudCheckAndInitialize(swapChain->AsIDxgiSwapChain()) is { } activeScene)
if (this.RenderDalamudCheckAndInitialize(swapChain->AsIDxgiSwapChain(), flags) is { } activeScene)
this.RenderDalamudDraw(activeScene);
// Upstream call to system IDXGISwapChain::Present will be called by ReShade.
@ -96,7 +96,7 @@ internal unsafe partial class InterfaceManager
{
Debug.Assert(this.dxgiSwapChainPresentHook is not null, "this.dxgiSwapChainPresentHook is not null");
if (this.RenderDalamudCheckAndInitialize(swapChain) is { } activeScene)
if (this.RenderDalamudCheckAndInitialize(swapChain, flags) is { } activeScene)
this.RenderDalamudDraw(activeScene);
return this.dxgiSwapChainPresentHook!.Original(swapChain, syncInterval, flags);

View file

@ -1,5 +1,3 @@
using System.Diagnostics;
using Dalamud.Interface.Internal.ReShadeHandling;
using Dalamud.Utility;
@ -44,7 +42,7 @@ internal unsafe partial class InterfaceManager
{
var swapChainNative = swapChain.GetNative<IDXGISwapChain>();
if (this.RenderDalamudCheckAndInitialize(swapChainNative) is { } activeScene)
if (this.RenderDalamudCheckAndInitialize(swapChainNative, 0) is { } activeScene)
this.RenderDalamudDraw(activeScene);
}

View file

@ -496,6 +496,7 @@ internal partial class InterfaceManager : IInternalDisposableService
/// <summary>Checks if the provided swap chain is the target that Dalamud should draw its interface onto,
/// and initializes ImGui for drawing.</summary>
/// <param name="swapChain">The swap chain to test and initialize ImGui with if conditions are met.</param>
/// <param name="flags">Flags passed to <see cref="IDXGISwapChain.Present"/>.</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, uint flags)