Skip to content

Commit 657f35a

Browse files
committed
Ensure patcher only runs on macOS
1 parent 763f998 commit 657f35a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Tobey.BZMacProcessFix/BZMacProcessFix.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using System.Collections.Generic;
77
using System.IO;
88
using System.Linq;
9+
using System.Runtime.InteropServices;
910

1011
namespace Tobey.BZMacProcessFix
1112
{
@@ -23,6 +24,11 @@ public static void Patch(AssemblyDefinition _) { }
2324
// which include a process filter for "SubnauticaZero" so that they will work on macOS, where the process name is "Subnautica Below Zero"
2425
public static void Initialize()
2526
{
27+
if (!RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
28+
{ // only run the patcher on macOS
29+
return;
30+
}
31+
2632
var dlls = Directory.GetFiles(Paths.PluginPath, "*.dll", SearchOption.AllDirectories).Distinct();
2733

2834
var bepinProcessType = typeof(BepInProcess);

Tobey.BZMacProcessFix/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.0.0")]
36-
[assembly: AssemblyFileVersion("1.0.0.0")]
35+
[assembly: AssemblyVersion("1.0.1.0")]
36+
[assembly: AssemblyFileVersion("1.0.1.0")]

0 commit comments

Comments
 (0)