diff options
Diffstat (limited to 'grapher/Models/Serialized/DriverSettings.cs')
| -rw-r--r-- | grapher/Models/Serialized/DriverSettings.cs | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/grapher/Models/Serialized/DriverSettings.cs b/grapher/Models/Serialized/DriverSettings.cs index cdccf88..d7c9444 100644 --- a/grapher/Models/Serialized/DriverSettings.cs +++ b/grapher/Models/Serialized/DriverSettings.cs @@ -4,11 +4,17 @@ using System.Threading; namespace grapher.Models.Serialized { + #region Enumerations + public enum AccelMode { - linear, classic, natural, logarithmic, sigmoid, naturalgain, sigmoidgain, power, noaccel + linear, classic, natural, naturalgain, sigmoidgain, power, noaccel } + #endregion Enumerations + + #region Structs + [StructLayout(LayoutKind.Sequential)] public struct AccelArgs { @@ -33,10 +39,14 @@ namespace grapher.Models.Serialized public T y; } + #endregion Structs + [StructLayout(LayoutKind.Sequential)] [Serializable] public class DriverSettings { + #region Fields + private static readonly IntPtr UnmanagedSettingsHandle = Marshal.AllocHGlobal(Marshal.SizeOf<DriverSettings>()); private static object UnmanagedSettingsLock = new object(); @@ -48,6 +58,10 @@ namespace grapher.Models.Serialized public Vec2<double> sensitivity; public double minimumTime; + #endregion Fields + + #region Methods + public static DriverSettings GetActive() { DriverInterop.GetActiveSettings(UnmanagedSettingsHandle); @@ -97,5 +111,7 @@ namespace grapher.Models.Serialized */ return true; } + + #endregion Methods } } |