diff options
| author | RogueAI42 <[email protected]> | 2017-08-02 16:49:19 +1000 |
|---|---|---|
| committer | RogueAI42 <[email protected]> | 2017-08-02 16:49:19 +1000 |
| commit | cf81ef177f12b99e53ad31dfb74107635c898d42 (patch) | |
| tree | dc4fa41d9a29ab2c943cf73154db347266d3225b | |
| parent | d51bda2fc57ab24a9041d87f7103483ff38f5e07 (diff) | |
| download | shiftos_thereturn-cf81ef177f12b99e53ad31dfb74107635c898d42.tar.gz shiftos_thereturn-cf81ef177f12b99e53ad31dfb74107635c898d42.tar.bz2 shiftos_thereturn-cf81ef177f12b99e53ad31dfb74107635c898d42.zip | |
detect mono
| -rw-r--r-- | ShiftOS_TheReturn/Lunix.cs | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ShiftOS_TheReturn/Lunix.cs b/ShiftOS_TheReturn/Lunix.cs index 3a07916..e933936 100644 --- a/ShiftOS_TheReturn/Lunix.cs +++ b/ShiftOS_TheReturn/Lunix.cs @@ -36,21 +36,13 @@ using System.Threading.Tasks; namespace ShiftOS.Engine { /// <summary> - /// Special functions for when we're running under Wine. (Pure Mono is not detected) + /// Platform related duties. Detect Wine and Mono, escape the former. /// </summary> public static class Lunix { - /// <summary> - /// Determines if the game is running under Wine or not. - /// </summary> - public static bool InWine - { - get - { - var WineKey = Registry.CurrentUser.OpenSubKey(@"Software\Wine"); - return WineKey != null; - } - } + public static readonly bool InWine = Registry.CurrentUser.OpenSubKey(@"Software\Wine") != null; + public static readonly bool InMono = Type.GetType("Mono.Framework") != null; + /// <summary> /// Escape Wine and run shell commands. /// </summary> |
