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 { /// - /// Special functions for when we're running under Wine. (Pure Mono is not detected) + /// Platform related duties. Detect Wine and Mono, escape the former. /// public static class Lunix { - /// - /// Determines if the game is running under Wine or not. - /// - 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; + /// /// Escape Wine and run shell commands. ///