diff options
| author | Jacob Palecki <[email protected]> | 2020-09-25 19:35:54 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-25 19:35:54 -0700 |
| commit | f2279a5c52d5da43e48133e753514b3806bb7e3c (patch) | |
| tree | 328830580cf5bb96a317a61bef3e155dc2a17fd5 /writer/Program.cs | |
| parent | Use log LUT rather than binary search for last mouse move point (diff) | |
| parent | add initial writer (diff) | |
| download | rawaccel-f2279a5c52d5da43e48133e753514b3806bb7e3c.tar.xz rawaccel-f2279a5c52d5da43e48133e753514b3806bb7e3c.zip | |
merge with writer
Diffstat (limited to 'writer/Program.cs')
| -rw-r--r-- | writer/Program.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/writer/Program.cs b/writer/Program.cs new file mode 100644 index 0000000..7f9c37c --- /dev/null +++ b/writer/Program.cs @@ -0,0 +1,30 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; + +using System; +using System.IO; + +namespace writer +{ + class Program + { + static void Main(string[] args) + { + try + { + var serializerSettings = new JsonSerializerSettings + { + MissingMemberHandling = MissingMemberHandling.Error, + }; + var token = JObject.Parse(File.ReadAllText(args[0]))["AccelerationSettings"]; + var settings = token.ToObject<DriverSettings>(JsonSerializer.Create(serializerSettings)); + DriverInterop.SetActiveSettings(settings); + } + catch (Exception e) + { + Console.WriteLine(e); + Console.ReadLine(); + } + } + } +} |