diff options
| author | Jacob Palecki <[email protected]> | 2021-07-03 15:30:47 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-07-03 15:30:47 -0700 |
| commit | 9a8042fe9c7506d0a41e3c635641d8d9e2424edc (patch) | |
| tree | 69c2b3916978eb5d2ae98c4602e285546e76d217 | |
| parent | Guide updates and accel type choice fixed (diff) | |
| download | rawaccel-9a8042fe9c7506d0a41e3c635641d8d9e2424edc.tar.xz rawaccel-9a8042fe9c7506d0a41e3c635641d8d9e2424edc.zip | |
Handle power\exponent correctly in GUI
| -rw-r--r-- | doc/Guide.md | 2 | ||||
| -rw-r--r-- | doc/images/classic_example.png | bin | 52040 -> 54866 bytes | |||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 28 |
3 files changed, 26 insertions, 4 deletions
diff --git a/doc/Guide.md b/doc/Guide.md index 8002ea9..d640451 100644 --- a/doc/Guide.md +++ b/doc/Guide.md @@ -106,7 +106,7 @@ The Raw Accel GUI reads the output of the raw input stream, and thus the output This option does not scale your acceleration curve in any way. Rather, DPI scales the set of points used to graph your curve, and shows you a window of input speed relevant for your chosen DPI. The poll rate is used as a safeguard for the Last Mouse Move points and therefore should be set for accuracy in that measurement. ## Acceleration Styles -The examples of various types below show some typical settings, without a cap or offset, for a mouse at 1200 DPI and 1000 hz. +The examples of various types below show some typical settings, without a cap or offset, for a mouse at 1600 DPI and 1000 hz. ### Linear This is simplest style used by most; it is simply a line rising at a given rate. This is a good choice for new users. diff --git a/doc/images/classic_example.png b/doc/images/classic_example.png Binary files differindex e626e86..58ca915 100644 --- a/doc/images/classic_example.png +++ b/doc/images/classic_example.png diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index 02f4acb..f97df2d 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -245,7 +245,7 @@ namespace grapher Acceleration.SetActiveValue(AccelerationParameterFromArgs(ref args)); Scale.SetActiveValue(args.scale); Limit.SetActiveValue(args.limit); - Exponent.SetActiveValue(args.exponent); + Exponent.SetActiveValue(ExponentParameterFromArgs(ref args)); Midpoint.SetActiveValue(args.midpoint); LutPanel.SetActiveValues(args.tableData.points, args.tableData.length); LutApply.SetActiveValue(args.tableData.velocity); @@ -307,7 +307,17 @@ namespace grapher if (Scale.Visible) args.scale = Scale.Field.Data; if (Cap.Visible) args.cap = Cap.Field.Data; if (Limit.Visible) args.limit = Limit.Field.Data; - if (Exponent.Visible) args.exponent = Exponent.Field.Data; + if (Exponent.Visible) + { + if (args.mode == AccelMode.classic) + { + args.power = Exponent.Field.Data; + } + else + { + args.exponent = Exponent.Field.Data; + } + } if (Offset.Visible) args.offset = Offset.Field.Data; if (Midpoint.Visible) args.midpoint = Midpoint.Field.Data; if (Weight.Visible) args.weight = Weight.Field.Data; @@ -387,7 +397,7 @@ namespace grapher switch (args.mode) { - case AccelMode.classic: return (args.exponent == 2) ? Linear : Classic; + case AccelMode.classic: return (args.power == 2) ? Linear : Classic; case AccelMode.jump: return Jump; case AccelMode.natural: return Natural; case AccelMode.motivity: return Motivity; @@ -413,6 +423,18 @@ namespace grapher } } + private double ExponentParameterFromArgs(ref AccelArgs args) + { + if (args.mode == AccelMode.classic) + { + return args.power; + } + else + { + return args.exponent; + } + } + #endregion Methods } } |