Skip to content

Commit ca38741

Browse files
committed
Use Platform class for TorrentClient
1 parent 7c0daa3 commit ca38741

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Assets/PatchKit Patcher/Scripts/AppData/Remote/Downloaders/TorrentClient.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ private Process StartProcess()
112112

113113
private ProcessStartInfo GetProcessStartInfo()
114114
{
115-
if (Application.platform == RuntimePlatform.WindowsPlayer ||
116-
Application.platform == RuntimePlatform.WindowsEditor)
115+
if (Platform.IsWindows())
117116
{
118117
var processStartInfo = new ProcessStartInfo
119118
{
@@ -127,8 +126,7 @@ private ProcessStartInfo GetProcessStartInfo()
127126
return processStartInfo;
128127
}
129128

130-
if(Application.platform == RuntimePlatform.OSXEditor ||
131-
Application.platform == RuntimePlatform.OSXPlayer)
129+
if (Platform.IsOSX())
132130
{
133131
var processStartInfo = new ProcessStartInfo
134132
{
@@ -144,7 +142,7 @@ private ProcessStartInfo GetProcessStartInfo()
144142
return processStartInfo;
145143
}
146144

147-
if(Application.platform == RuntimePlatform.LinuxPlayer && IntPtr.Size == 8) // Linux 64 bit
145+
if (Platform.IsLinux() && IntPtr.Size == 8) // Linux 64 bit
148146
{
149147
var processStartInfo = new ProcessStartInfo
150148
{

Assets/PatchKit Patcher/Scripts/Utilities/Platform.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ public static bool IsOSX()
4646

4747
public static bool IsLinux()
4848
{
49-
// TODO: Why there's no Linux Editor?
50-
return IsOneOf(RuntimePlatform.LinuxPlayer);
49+
return IsOneOf(RuntimePlatform.LinuxPlayer, RuntimePlatform.LinuxEditor);
5150
}
5251

5352
public static bool IsOneOf(params RuntimePlatform[] platforms)

0 commit comments

Comments
 (0)