summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/SCore.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-09 15:01:25 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-10-09 15:01:25 -0400
commit42ff20cd92a3a28faca8de0c309396efa147f0e2 (patch)
tree90255e339ec7d0902d31d165a9635a269e4e7db2 /src/SMAPI/Framework/SCore.cs
parentd143ab1077d7a3fb8638f0cc494aadf8688a0952 (diff)
downloadSMAPI-42ff20cd92a3a28faca8de0c309396efa147f0e2.tar.gz
SMAPI-42ff20cd92a3a28faca8de0c309396efa147f0e2.tar.bz2
SMAPI-42ff20cd92a3a28faca8de0c309396efa147f0e2.zip
suppress Harmony debug mode by default
Diffstat (limited to 'src/SMAPI/Framework/SCore.cs')
-rw-r--r--src/SMAPI/Framework/SCore.cs9
1 files changed, 9 insertions, 0 deletions
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