Cleanup platform detection some more
This commit is contained in:
parent
5ae4ba3638
commit
3881497067
|
@ -85,7 +85,7 @@ namespace SparkleShare {
|
||||||
ShowHelp (p);
|
ShowHelp (p);
|
||||||
|
|
||||||
|
|
||||||
switch (SparkleShare.Platform ()) {
|
switch (SparkleShare.Platform) {
|
||||||
|
|
||||||
case PlatformID.Unix:
|
case PlatformID.Unix:
|
||||||
SetProcessName ("sparkleshare");
|
SetProcessName ("sparkleshare");
|
||||||
|
@ -182,7 +182,11 @@ namespace SparkleShare {
|
||||||
static extern int uname (IntPtr buf);
|
static extern int uname (IntPtr buf);
|
||||||
|
|
||||||
|
|
||||||
static PlatformID Platform () {
|
// This fixes the PlatformID enumeration for MacOSX in Environment.OSVersion.Platform,
|
||||||
|
// which is intentionally broken in Mono for hystorical reasons
|
||||||
|
static PlatformID Platform {
|
||||||
|
|
||||||
|
get {
|
||||||
|
|
||||||
IntPtr buf = IntPtr.Zero;
|
IntPtr buf = IntPtr.Zero;
|
||||||
|
|
||||||
|
@ -208,4 +212,6 @@ namespace SparkleShare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue