summaryrefslogtreecommitdiff
path: root/writer/Program.cs
diff options
context:
space:
mode:
authora1xd <[email protected]>2020-09-26 02:10:29 -0400
committerGitHub <[email protected]>2020-09-26 02:10:29 -0400
commit9353f5b9adc50456fefc2e55aab5e57029e89682 (patch)
tree5d28926aee87c077ffc4ed7222469bbf2f28bd2c /writer/Program.cs
parentMerge pull request #22 from JacobPalecki/GUI (diff)
parentSetActive changes field default, bugs fixed (diff)
downloadrawaccel-9353f5b9adc50456fefc2e55aab5e57029e89682.tar.xz
rawaccel-9353f5b9adc50456fefc2e55aab5e57029e89682.zip
Merge pull request #23 from JacobPalecki/GUI
Settings writer; GUI performance enhancement and touchups
Diffstat (limited to 'writer/Program.cs')
-rw-r--r--writer/Program.cs30
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();
+ }
+ }
+ }
+}