Browse Source

Move DisallowLegacyGlobalUnpatchAll to StdoutInterceptor

pull/75/head
Eris 2 years ago
parent
commit
5bda9e3669
2 changed files with 2 additions and 3 deletions
  1. +0
    -2
      IPA.Loader/Loader/HarmonyProtector.cs
  2. +2
    -1
      IPA.Loader/Logging/StdoutInterceptor.cs

+ 0
- 2
IPA.Loader/Loader/HarmonyProtector.cs View File

@ -16,8 +16,6 @@ namespace IPA.Loader
public static void Protect(Harmony inst = null)
{
HarmonyGlobalSettings.DisallowLegacyGlobalUnpatchAll = true;
selfAssem = Assembly.GetExecutingAssembly();
harmonyAssem = typeof(Harmony).Assembly;


+ 2
- 1
IPA.Loader/Logging/StdoutInterceptor.cs View File

@ -192,9 +192,10 @@ namespace IPA.Logging
EnsureHarmonyLogging();
HarmonyGlobalSettings.DisallowLegacyGlobalUnpatchAll = true;
harmony ??= new Harmony("BSIPA Console Redirector Patcher");
stdoutInterceptor ??= new StdoutInterceptor();
stderrInterceptor ??= new StdoutInterceptor() { isStdErr = true };
stderrInterceptor ??= new StdoutInterceptor { isStdErr = true };
RedirectConsole();
ConsoleHarmonyPatches.Patch(harmony);


Loading…
Cancel
Save