Skip to content

Commit

Permalink
Update Core.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Feb 3, 2025
1 parent 2696d30 commit 5dcf221
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions MelonLoader.Bootstrap/Core.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public static class Core
public static nint LibraryHandle { get; private set; }

internal static InternalLogger Logger { get; private set; } = new(Color.BlueViolet, "MelonLoader.Bootstrap");
public static string DataDir { get; private set; } = null!;
public static string GameDir { get; private set; } = null!;

#if LINUX
[System.Runtime.InteropServices.UnmanagedCallersOnly(EntryPoint = "Init")]
Expand All @@ -24,10 +22,8 @@ public static void Init(nint moduleHandle)
LibraryHandle = moduleHandle;

var exePath = Environment.ProcessPath!;
GameDir = Path.GetDirectoryName(exePath)!;

DataDir = Path.Combine(GameDir, Path.GetFileNameWithoutExtension(exePath) + "_Data");
if (!Directory.Exists(DataDir))
string exeName = Path.GetFileName(exePath);
if (exeName.ToLower().Contains("unitycrashhandler"))
return;

InitConfig();
Expand Down

0 comments on commit 5dcf221

Please sign in to comment.