Procházet zdrojové kódy

Remove use of Process.GetCurrentProcess() since it can fail on older monos on macOS
Rebase of d566ac2

Bepis před 4 roky
rodič
revize
2a0e6041fc

+ 1 - 1
BepInEx.Core/Bootstrap/BaseChainloader.cs

@@ -15,7 +15,7 @@ namespace BepInEx.Bootstrap
 	{
 		#region Contract
 
-		protected virtual string ConsoleTitle => $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}";
+		protected virtual string ConsoleTitle => $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Paths.ProcessName}";
 
 		private bool _initialized = false;
 

+ 1 - 1
BepInEx.Preloader.Core/Logging/ChainloaderLogHelper.cs

@@ -9,7 +9,7 @@ namespace BepInEx.Preloader.Core.Logging
 	{
 		public static void PrintLogInfo(ManualLogSource log)
 		{
-			string consoleTitle = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}";
+			string consoleTitle = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Paths.ProcessName}";
 			log.LogMessage(consoleTitle);
 
 			if (ConsoleManager.ConsoleActive)