mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 12:44:16 +01:00
interface: bump log levels during init for now
This commit is contained in:
parent
4d0ab8e254
commit
ec269f483e
1 changed files with 14 additions and 7 deletions
|
|
@ -774,7 +774,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
|
|
||||||
if (ReShadeAddonInterface.ReShadeHasSignature)
|
if (ReShadeAddonInterface.ReShadeHasSignature)
|
||||||
{
|
{
|
||||||
Log.Warning("Signed ReShade binary detected.");
|
Log.Warning("Signed ReShade binary detected");
|
||||||
Service<NotificationManager>
|
Service<NotificationManager>
|
||||||
.GetAsync()
|
.GetAsync()
|
||||||
.ContinueWith(
|
.ContinueWith(
|
||||||
|
|
@ -809,7 +809,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
if (this.dalamudConfiguration.ReShadeHandlingMode == ReShadeHandlingMode.UnwrapReShade)
|
if (this.dalamudConfiguration.ReShadeHandlingMode == ReShadeHandlingMode.UnwrapReShade)
|
||||||
{
|
{
|
||||||
if (SwapChainHelper.UnwrapReShade())
|
if (SwapChainHelper.UnwrapReShade())
|
||||||
Log.Verbose("Unwrapped ReShade.");
|
Log.Information("Unwrapped ReShade");
|
||||||
}
|
}
|
||||||
|
|
||||||
ResizeBuffersDelegate? resizeBuffersDelegate = null;
|
ResizeBuffersDelegate? resizeBuffersDelegate = null;
|
||||||
|
|
@ -820,14 +820,18 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
{
|
{
|
||||||
resizeBuffersDelegate = this.AsReShadeAddonResizeBuffersDetour;
|
resizeBuffersDelegate = this.AsReShadeAddonResizeBuffersDetour;
|
||||||
|
|
||||||
Log.Verbose(
|
Log.Information(
|
||||||
"Registered as a ReShade({name}: 0x{addr:X}) addon.",
|
"Registered as a ReShade({Name}: 0x{Addr:X}) addon",
|
||||||
ReShadeAddonInterface.ReShadeModule!.FileName,
|
ReShadeAddonInterface.ReShadeModule!.FileName,
|
||||||
ReShadeAddonInterface.ReShadeModule!.BaseAddress);
|
ReShadeAddonInterface.ReShadeModule!.BaseAddress);
|
||||||
this.reShadeAddonInterface.InitSwapChain += this.ReShadeAddonInterfaceOnInitSwapChain;
|
this.reShadeAddonInterface.InitSwapChain += this.ReShadeAddonInterfaceOnInitSwapChain;
|
||||||
this.reShadeAddonInterface.DestroySwapChain += this.ReShadeAddonInterfaceOnDestroySwapChain;
|
this.reShadeAddonInterface.DestroySwapChain += this.ReShadeAddonInterfaceOnDestroySwapChain;
|
||||||
this.reShadeAddonInterface.ReShadeOverlay += this.ReShadeAddonInterfaceOnReShadeOverlay;
|
this.reShadeAddonInterface.ReShadeOverlay += this.ReShadeAddonInterfaceOnReShadeOverlay;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log.Information("Could not register as ReShade addon");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resizeBuffersDelegate is null)
|
if (resizeBuffersDelegate is null)
|
||||||
|
|
@ -841,6 +845,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
case SwapChainHelper.HookMode.ByteCode:
|
case SwapChainHelper.HookMode.ByteCode:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
Log.Information("Hooking using bytecode...");
|
||||||
this.resizeBuffersHook = Hook<ResizeBuffersDelegate>.FromAddress(
|
this.resizeBuffersHook = Hook<ResizeBuffersDelegate>.FromAddress(
|
||||||
(nint)SwapChainHelper.GameDeviceSwapChainVtbl->ResizeBuffers,
|
(nint)SwapChainHelper.GameDeviceSwapChainVtbl->ResizeBuffers,
|
||||||
resizeBuffersDelegate);
|
resizeBuffersDelegate);
|
||||||
|
|
@ -850,6 +855,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
this.dxgiPresentHook = Hook<DxgiPresentDelegate>.FromAddress(
|
this.dxgiPresentHook = Hook<DxgiPresentDelegate>.FromAddress(
|
||||||
(nint)SwapChainHelper.GameDeviceSwapChainVtbl->Present,
|
(nint)SwapChainHelper.GameDeviceSwapChainVtbl->Present,
|
||||||
dxgiPresentDelegate);
|
dxgiPresentDelegate);
|
||||||
|
Log.Information("Hooked present using bytecode");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
@ -857,6 +863,7 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
|
|
||||||
case SwapChainHelper.HookMode.VTable:
|
case SwapChainHelper.HookMode.VTable:
|
||||||
{
|
{
|
||||||
|
Log.Information("Hooking using VTable...");
|
||||||
this.swapChainHook = new(SwapChainHelper.GameDeviceSwapChain);
|
this.swapChainHook = new(SwapChainHelper.GameDeviceSwapChain);
|
||||||
this.resizeBuffersHook = this.swapChainHook.CreateHook(
|
this.resizeBuffersHook = this.swapChainHook.CreateHook(
|
||||||
nameof(IDXGISwapChain.ResizeBuffers),
|
nameof(IDXGISwapChain.ResizeBuffers),
|
||||||
|
|
@ -867,15 +874,15 @@ internal partial class InterfaceManager : IInternalDisposableService
|
||||||
this.dxgiPresentHook = this.swapChainHook.CreateHook(
|
this.dxgiPresentHook = this.swapChainHook.CreateHook(
|
||||||
nameof(IDXGISwapChain.Present),
|
nameof(IDXGISwapChain.Present),
|
||||||
dxgiPresentDelegate);
|
dxgiPresentDelegate);
|
||||||
|
Log.Information("Hooked present using VTable");
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.Verbose(
|
Log.Information($"IDXGISwapChain::ResizeBuffers address: {Util.DescribeAddress(this.resizeBuffersHook.Address)}");
|
||||||
$"IDXGISwapChain::ResizeBuffers address: {Util.DescribeAddress(this.resizeBuffersHook.Address)}");
|
Log.Information($"IDXGISwapChain::Present address: {Util.DescribeAddress(this.dxgiPresentHook?.Address ?? 0)}");
|
||||||
Log.Verbose($"IDXGISwapChain::Present address: {Util.DescribeAddress(this.dxgiPresentHook?.Address ?? 0)}");
|
|
||||||
|
|
||||||
this.setCursorHook.Enable();
|
this.setCursorHook.Enable();
|
||||||
this.resizeBuffersHook.Enable();
|
this.resizeBuffersHook.Enable();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue