mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Remove use of Process.GetCurrentProcess() since it can fail on older monos on macOS
This commit is contained in:
1 parent
83b0f5e114
commit
d566ac252c
2 files changed
+2
-2
No files matched your search
@@ -47,7 +47,7 @@ namespace BepInEx.Preloader
|
||||
PreloaderLog = new PreloaderConsoleListener();
|
||||
Logger.Listeners.Add(PreloaderLog);
|
||||
|
||||
string consoleTile = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}";
|
||||
string consoleTile = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Paths.ProcessName}";
|
||||
|
||||
if (ConsoleManager.ConsoleActive)
|
||||
ConsoleManager.SetConsoleTitle(consoleTile);
|
||||
|
||||
@@ -231,7 +231,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) ?? Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}");
|
||||
ConsoleManager.SetConsoleTitle($"{CurrentAssemblyName} {CurrentAssemblyVersion} - {productNameProp?.GetValue(null, null) ?? Paths.ProcessName}");
|
||||
|
||||
Logger.LogMessage("Chainloader started");
|
||||
|
||||
|
||||
Reference in new issue
Block a user