From 246fb772c5bf7dd6a85143fadebece3b4d9f1e04 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 1 Sep 2020 02:18:41 -0700 Subject: Add constants class and separate classes into regions --- grapher/Models/Serialized/DriverSettings.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'grapher/Models/Serialized/DriverSettings.cs') diff --git a/grapher/Models/Serialized/DriverSettings.cs b/grapher/Models/Serialized/DriverSettings.cs index 91d7e9f..e0b5d4a 100644 --- a/grapher/Models/Serialized/DriverSettings.cs +++ b/grapher/Models/Serialized/DriverSettings.cs @@ -3,11 +3,17 @@ using System.Runtime.InteropServices; namespace grapher.Models.Serialized { + #region Enumerations + public enum AccelMode { linear, classic, natural, logarithmic, sigmoid, naturalgain, sigmoidgain, power, noaccel } + #endregion Enumerations + + #region Structs + [StructLayout(LayoutKind.Sequential)] public struct AccelArgs { @@ -31,10 +37,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()); @@ -45,6 +55,10 @@ namespace grapher.Models.Serialized public Vec2 sensitivity; public double minimumTime; + #endregion Fields + + #region Methods + public static DriverSettings GetActive() { DriverInterop.GetActiveSettings(UnmanagedSettingsHandle); @@ -83,5 +97,7 @@ namespace grapher.Models.Serialized */ return true; } + + #endregion Methods } } -- cgit v1.2.3