From 42ff20cd92a3a28faca8de0c309396efa147f0e2 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 9 Oct 2022 15:01:25 -0400 Subject: suppress Harmony debug mode by default --- src/SMAPI/Framework/SCore.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/SMAPI/Framework/SCore.cs') diff --git a/src/SMAPI/Framework/SCore.cs b/src/SMAPI/Framework/SCore.cs index 114c4bb3..3e6cd853 100644 --- a/src/SMAPI/Framework/SCore.cs +++ b/src/SMAPI/Framework/SCore.cs @@ -501,6 +501,15 @@ namespace StardewModdingAPI.Framework return; } + /********* + ** Prevent Harmony debug mode + *********/ + if (HarmonyLib.Harmony.DEBUG && this.Settings.SuppressHarmonyDebugMode) + { + HarmonyLib.Harmony.DEBUG = false; + this.Monitor.LogOnce("A mod enabled Harmony debug mode, which impacts performance and creates a file on your desktop. SMAPI will try to keep it disabled. (You can allow debug mode by editing the smapi-internal/config.json file.)", LogLevel.Warn); + } + #if SMAPI_DEPRECATED /********* ** Reload assets when interceptors are added/removed -- cgit