Skip to content

Commit 08123c8

Browse files
authored
Added error log if bootloader dll fails to be moved into game dir (#1211)
* Removed unused field in NitroxEntryPatch.cs * Added error log if launcher fails to move bootloader dll into game dir
1 parent 07a538a commit 08123c8

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

NitroxLauncher/LauncherLogic.cs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System;
2-
using System.Collections.Generic;
32
using System.ComponentModel;
43
using System.Diagnostics;
54
using System.IO;
@@ -215,9 +214,9 @@ internal async Task StartMultiplayerAsync()
215214
{
216215
File.Copy(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "lib", bootloaderName), Path.Combine(subnauticaPath, "Subnautica_Data", "Managed", bootloaderName), true);
217216
}
218-
catch (IOException)
217+
catch (IOException ex)
219218
{
220-
// ignored
219+
Log.Error(ex, "Unable to move bootloader dll to Managed folder. Still attempting to launch because it might exist from previous runs.");
221220
}
222221

223222
nitroxEntryPatch.Remove(); // Remove any previous instances first.

NitroxLauncher/Patching/NitroxEntryPatch.cs

-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ private static int FindNitroxExecuteInstructionIndex(IList<Instruction> methodIn
135135
private bool IsPatchApplied()
136136
{
137137
string gameInputPath = Path.Combine(subnauticaManagedPath, GAME_ASSEMBLY_NAME);
138-
string nitroxPatcherPath = Path.Combine(subnauticaManagedPath, NITROX_ASSEMBLY_NAME);
139138

140139
using (ModuleDefMD module = ModuleDefMD.Load(gameInputPath))
141140
{

0 commit comments

Comments
 (0)