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

Rebase of d566ac2
This commit is contained in:
Bepis committed 2020-11-06 00:29:14 +11:00
1 parent d93ff76e32
commit 2a0e6041fc
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -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;
@@ -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)