diff options
| author | a1xd <[email protected]> | 2020-10-06 00:19:56 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-10-07 05:31:23 -0400 |
| commit | 6dbeca0806f32fae5a8fb4a27465bea46e22d58d (patch) | |
| tree | 4ac089a58a81bc5846dee68c44d34c5c901f8792 | |
| parent | improve installer + docs (diff) | |
| download | rawaccel-6dbeca0806f32fae5a8fb4a27465bea46e22d58d.tar.xz rawaccel-6dbeca0806f32fae5a8fb4a27465bea46e22d58d.zip | |
add static default settings in wrapper
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 2 | ||||
| -rw-r--r-- | wrapper/wrapper.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index f9ecac1..4410a12 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -227,7 +227,7 @@ namespace grapher public void SetArgs(ref AccelArgs args) { - AccelArgs defaults = (AccelArgs)DriverInterop.DefaultArgs; + AccelArgs defaults = DriverInterop.DefaultSettings.args.x; args.acceleration = Acceleration.Visible ? Acceleration.Field.Data : defaults.acceleration; args.scale = Scale.Visible ? Scale.Field.Data : defaults.scale; args.gainCap = Cap.Visible ? Cap.VelocityGainCap : defaults.gainCap; diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp index a8fc0fb..d1f0e09 100644 --- a/wrapper/wrapper.cpp +++ b/wrapper/wrapper.cpp @@ -177,7 +177,7 @@ public: public ref struct DriverInterop { literal double WriteDelayMs = WRITE_DELAY; - static initonly AccelArgs^ DefaultArgs = get_default()->args.x; + static initonly DriverSettings^ DefaultSettings = get_default(); static DriverSettings^ GetActiveSettings() { |