Skip to content

Commit

Permalink
interface: only warn about signed reshade if we are actually using ad…
Browse files Browse the repository at this point in the history
…don mode
  • Loading branch information
goaaats committed Jul 28, 2024
1 parent b13e1ee commit 73e50c8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
3 changes: 2 additions & 1 deletion Dalamud/Interface/Internal/InterfaceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,8 @@ private unsafe void ContinueConstruction(
0,
this.SetCursorDetour);

if (ReShadeAddonInterface.ReShadeIsSignedByReShade)
if (ReShadeAddonInterface.ReShadeIsSignedByReShade &&
this.dalamudConfiguration.ReShadeHandlingMode is ReShadeHandlingMode.ReShadeAddonPresent or ReShadeHandlingMode.ReShadeAddonReShadeOverlay)
{
Log.Warning("Signed ReShade binary detected");
Service<NotificationManager>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,24 @@ public class SettingsTabExperimental : SettingsTab
(v, c) => c.ReShadeHandlingMode = v,
fallbackValue: ReShadeHandlingMode.Default,
warning: static rshm =>
rshm is ReShadeHandlingMode.UnwrapReShade or ReShadeHandlingMode.None ||
Service<DalamudConfiguration>.Get().SwapChainHookMode == SwapChainHelper.HookMode.ByteCode
? null
: "Current option will be ignored and no special ReShade handling will be done, because SwapChain vtable hook mode is set.")
{
var warning = string.Empty;
warning += rshm is ReShadeHandlingMode.UnwrapReShade or ReShadeHandlingMode.None ||
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
{
Expand Down

0 comments on commit 73e50c8

Please sign in to comment.