Implement cross-platform improvements from master

Contains fixes rebased from d2afe06 ... 9f4dcb6
This commit is contained in:
Bepis committed 2020-11-05 23:18:52 +11:00
1 parent 265f484447
commit 1c32115fa2
34 files changed
+1117 -257

No files matched your search

@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.IO;
using System.Linq;
using BepInEx.Logging;
@@ -8,11 +9,11 @@ namespace BepInEx.Preloader.Core.Logging
{
public static void PrintLogInfo(ManualLogSource log)
{
string consoleTile = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Process.GetCurrentProcess().ProcessName}";
log.LogMessage(consoleTile);
string consoleTitle = $"BepInEx {typeof(Paths).Assembly.GetName().Version} - {Path.GetFileNameWithoutExtension(Process.GetCurrentProcess().ProcessName)}";
log.LogMessage(consoleTitle);
if (ConsoleManager.ConsoleActive)
ConsoleManager.SetConsoleTitle(consoleTile);
ConsoleManager.SetConsoleTitle(consoleTitle);
//See BuildInfoAttribute for more information about this section.
object[] attributes = typeof(BuildInfoAttribute).Assembly.GetCustomAttributes(typeof(BuildInfoAttribute), false);
@@ -37,7 +38,7 @@ namespace BepInEx.Preloader.Core.Logging
foreach (var preloaderLogEvent in PreloaderConsoleListener.LogEvents)
{
PreloaderLogger.Log.Log(preloaderLogEvent.Level, $"[{ preloaderLogEvent.Source.SourceName,10}] { preloaderLogEvent.Data}");
Logger.InternalLogEvent(PreloaderLogger.Log, preloaderLogEvent);
}
if (logListener != null)