interface: only warn about signed reshade if we are actually using addon mode

This commit is contained in:
goat 2024-07-28 22:06:53 +02:00
parent b13e1eef86
commit 73e50c823b
2 changed files with 20 additions and 5 deletions

View file

@ -817,7 +817,8 @@ internal partial class InterfaceManager : IInternalDisposableService
0, 0,
this.SetCursorDetour); this.SetCursorDetour);
if (ReShadeAddonInterface.ReShadeIsSignedByReShade) if (ReShadeAddonInterface.ReShadeIsSignedByReShade &&
this.dalamudConfiguration.ReShadeHandlingMode is ReShadeHandlingMode.ReShadeAddonPresent or ReShadeHandlingMode.ReShadeAddonReShadeOverlay)
{ {
Log.Warning("Signed ReShade binary detected"); Log.Warning("Signed ReShade binary detected");
Service<NotificationManager> Service<NotificationManager>

View file

@ -81,10 +81,24 @@ public class SettingsTabExperimental : SettingsTab
(v, c) => c.ReShadeHandlingMode = v, (v, c) => c.ReShadeHandlingMode = v,
fallbackValue: ReShadeHandlingMode.Default, fallbackValue: ReShadeHandlingMode.Default,
warning: static rshm => warning: static rshm =>
rshm is ReShadeHandlingMode.UnwrapReShade or ReShadeHandlingMode.None || {
Service<DalamudConfiguration>.Get().SwapChainHookMode == SwapChainHelper.HookMode.ByteCode var warning = string.Empty;
? null warning += rshm is ReShadeHandlingMode.UnwrapReShade or ReShadeHandlingMode.None ||
: "Current option will be ignored and no special ReShade handling will be done, because SwapChain vtable hook mode is set.") Service<DalamudConfiguration>.Get().SwapChainHookMode == SwapChainHelper.HookMode.ByteCode
? string.Empty
: "Current option will be ignored and no special ReShade handling will be done, because SwapChain vtable hook mode is set.";
if (ReShadeAddonInterface.ReShadeIsSignedByReShade)
{
warning += warning.Length > 0 ? "\n" : string.Empty;
warning += Loc.Localize(
"ReShadeNoAddonSupportNotificationContent",
"Your installation of ReShade does not have full addon support, and may not work with Dalamud and/or the game.\n" +
"Download and install ReShade with full addon-support.");
}
return warning.Length > 0 ? warning : null;
})
{ {
FriendlyEnumNameGetter = x => x switch FriendlyEnumNameGetter = x => x switch
{ {