فهرست منبع

Trim console title process name

Bepis 4 سال پیش
والد
کامیت
833ae93ee1
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      BepInEx.Preloader/Preloader.cs
  2. 1 1
      BepInEx/Bootstrap/Chainloader.cs

+ 1 - 1
BepInEx.Preloader/Preloader.cs

@@ -56,7 +56,7 @@ namespace BepInEx.Preloader
 				PreloaderLog = new PreloaderConsoleListener(ConfigPreloaderCOutLogging.Value);
 				Logger.Listeners.Add(PreloaderLog);
 
-				string consoleTile = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Process.GetCurrentProcess().ProcessName}";
+				string consoleTile = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}";
 
 				if (ConsoleManager.ConsoleActive)
 					ConsoleManager.SetConsoleTitle(consoleTile);

+ 1 - 1
BepInEx/Bootstrap/Chainloader.cs

@@ -230,7 +230,7 @@ namespace BepInEx.Bootstrap
 				var productNameProp = typeof(Application).GetProperty("productName", BindingFlags.Public | BindingFlags.Static);
 
 				if (ConsoleManager.ConsoleActive)
-					ConsoleManager.SetConsoleTitle($"{CurrentAssemblyName} {CurrentAssemblyVersion} - {productNameProp?.GetValue(null, null) ?? Process.GetCurrentProcess().ProcessName}");
+					ConsoleManager.SetConsoleTitle($"{CurrentAssemblyName} {CurrentAssemblyVersion} - {productNameProp?.GetValue(null, null) ?? Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}");
 
 				Logger.LogMessage("Chainloader started");