Преглед на файлове

Fix platform detection for xterm fix
Mono seems to exit the method prematurely if you use PlatformHelper here. No exception either, so it can't be catched

Bepis преди 4 години
родител
ревизия
e5651fa1bb
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      BepInEx.Preloader/RuntimeFixes/XTermFix.cs

+ 1 - 2
BepInEx.Preloader/RuntimeFixes/XTermFix.cs

@@ -3,7 +3,6 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Reflection.Emit;
 using HarmonyLib;
-using MonoMod.Utils;
 
 namespace BepInEx.Preloader.RuntimeFixes
 {
@@ -11,7 +10,7 @@ namespace BepInEx.Preloader.RuntimeFixes
 	{
 		public static void Apply()
 		{
-			if (!PlatformHelper.Is(Platform.Linux))
+			if (Environment.OSVersion.Platform != PlatformID.Unix)
 				return;
 
 			if (AccessTools.Method("System.TermInfoReader:DetermineVersion") != null)