未验证 提交 250a9396 编写于 作者: A Alex Thibodeau 提交者: GitHub

Merge pull request #1328 from Unity-Technologies/unity-master-fix-case-1267836

[corlib] Use Environment.Platform to access the platform, rather than…
......@@ -43,13 +43,12 @@ namespace System.Runtime.InteropServices
public static bool IsOSPlatform (OSPlatform osPlatform)
{
switch (Environment.OSVersion.Platform) {
switch (Environment.Platform) {
case PlatformID.Win32NT:
return osPlatform == OSPlatform.Windows;
case PlatformID.MacOSX:
return osPlatform == OSPlatform.OSX;
case PlatformID.Unix:
if (File.Exists ("/usr/lib/libc.dylib"))
return osPlatform == OSPlatform.OSX;
return osPlatform == OSPlatform.Linux;
default:
return false;
......
......@@ -214,7 +214,7 @@ namespace System {
//
static OperatingSystem os;
static extern PlatformID Platform {
static internal PlatformID Platform {
[MethodImplAttribute (MethodImplOptions.InternalCall)]
get;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册