mirror of
https://github.com/RawAccelOfficial/rawaccel.git
synced 2025-05-11 18:36:46 +02:00
rename directional multipliers
changes profile layout
This commit is contained in:
parent
62d9e1da9c
commit
94ce1542b0
6 changed files with 33 additions and 28 deletions
|
@ -71,20 +71,20 @@ namespace rawaccel {
|
|||
vec2d domain_weights = { 1, 1 };
|
||||
vec2d range_weights = { 1, 1 };
|
||||
|
||||
double sensitivity = 1;
|
||||
double yx_sens_ratio = 1;
|
||||
|
||||
accel_args accel_x;
|
||||
accel_args accel_y;
|
||||
|
||||
double speed_min = 0;
|
||||
double speed_max = 0;
|
||||
|
||||
vec2d dir_multipliers = { 1, 1 };
|
||||
double sensitivity = 1;
|
||||
double yx_sens_ratio = 1;
|
||||
double lr_sens_ratio = 1;
|
||||
double ud_sens_ratio = 1;
|
||||
|
||||
double degrees_rotation = 0;
|
||||
|
||||
double degrees_snap = 0;
|
||||
|
||||
double speed_min = 0;
|
||||
double speed_max = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -157,8 +157,8 @@ namespace rawaccel {
|
|||
error("domain weights"" must be positive");
|
||||
}
|
||||
|
||||
if (args.dir_multipliers.x <= 0 || args.dir_multipliers.y <= 0) {
|
||||
error("negative directional multipliers must be positive");
|
||||
if (args.lr_sens_ratio <= 0 || args.ud_sens_ratio <= 0) {
|
||||
error("sens ratio must be positive");
|
||||
}
|
||||
|
||||
if (args.lp_norm <= 0) {
|
||||
|
|
|
@ -139,11 +139,11 @@ namespace rawaccel {
|
|||
in.y *= dpi_adjusted_sens * args.yx_sens_ratio;
|
||||
|
||||
if (apply_dir_mul_x && in.x < 0) {
|
||||
in.x *= args.dir_multipliers.x;
|
||||
in.x *= args.lr_sens_ratio;
|
||||
}
|
||||
|
||||
if (apply_dir_mul_y && in.y < 0) {
|
||||
in.y *= args.dir_multipliers.y;
|
||||
in.y *= args.ud_sens_ratio;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,8 +156,8 @@ namespace rawaccel {
|
|||
apply_snap = args.degrees_snap != 0;
|
||||
apply_directional_weight = args.range_weights.x != args.range_weights.y;
|
||||
compute_ref_angle = apply_snap || apply_directional_weight;
|
||||
apply_dir_mul_x = args.dir_multipliers.x != 1;
|
||||
apply_dir_mul_y = args.dir_multipliers.y != 1;
|
||||
apply_dir_mul_x = args.lr_sens_ratio != 1;
|
||||
apply_dir_mul_y = args.ud_sens_ratio != 1;
|
||||
|
||||
if (!args.whole) {
|
||||
distance_mode = distance_mode::separate;
|
||||
|
|
|
@ -757,7 +757,11 @@ namespace grapher.Models.Mouse
|
|||
|
||||
// strip negative directional multipliers, charts calculated from positive input
|
||||
|
||||
Vec2<double> dirMults = SettingsManager.ActiveProfile.directionalMultipliers;
|
||||
Vec2<double> dirMults = new Vec2<double>
|
||||
{
|
||||
x = SettingsManager.ActiveProfile.lrSensRatio,
|
||||
y = SettingsManager.ActiveProfile.udSensRatio
|
||||
};
|
||||
|
||||
if (dirMults.x > 0 && x < 0)
|
||||
{
|
||||
|
|
|
@ -179,7 +179,8 @@ namespace grapher.Models.Serialized
|
|||
settings.snap = UserProfile.snap;
|
||||
settings.maximumSpeed = UserProfile.maximumSpeed;
|
||||
settings.minimumSpeed = UserProfile.minimumSpeed;
|
||||
settings.directionalMultipliers = UserProfile.directionalMultipliers;
|
||||
settings.lrSensRatio = UserProfile.lrSensRatio;
|
||||
settings.udSensRatio = UserProfile.udSensRatio;
|
||||
}
|
||||
|
||||
public GUISettings MakeGUISettingsFromFields()
|
||||
|
|
|
@ -116,24 +116,19 @@ public ref struct Profile
|
|||
[JsonProperty("Stretches accel range for horizontal vs vertical inputs")]
|
||||
Vec2<double> rangeXY;
|
||||
|
||||
[JsonProperty("Sensitivity multiplier")]
|
||||
double sensitivity;
|
||||
|
||||
[JsonProperty("Y/X sensitivity ratio (vertical sens multiplier)")]
|
||||
double yxSensRatio;
|
||||
|
||||
[JsonProperty("Whole or horizontal accel parameters")]
|
||||
AccelArgs argsX;
|
||||
[JsonProperty("Vertical accel parameters")]
|
||||
AccelArgs argsY;
|
||||
|
||||
[JsonIgnore]
|
||||
double minimumSpeed;
|
||||
[JsonProperty("Input Speed Cap")]
|
||||
double maximumSpeed;
|
||||
|
||||
[JsonProperty("Negative directional multipliers")]
|
||||
Vec2<double> directionalMultipliers;
|
||||
[JsonProperty("Sensitivity multiplier")]
|
||||
double sensitivity;
|
||||
[JsonProperty("Y/X sensitivity ratio (vertical sens multiplier)")]
|
||||
double yxSensRatio;
|
||||
[JsonProperty("L/R sensitivity ratio (left sens multiplier)")]
|
||||
double lrSensRatio;
|
||||
[JsonProperty("U/D sensitivity ratio (up sens multiplier)")]
|
||||
double udSensRatio;
|
||||
|
||||
[JsonProperty("Degrees of rotation")]
|
||||
double rotation;
|
||||
|
@ -141,6 +136,11 @@ public ref struct Profile
|
|||
[JsonProperty("Degrees of angle snapping")]
|
||||
double snap;
|
||||
|
||||
[JsonIgnore]
|
||||
double minimumSpeed;
|
||||
[JsonProperty("Input Speed Cap")]
|
||||
double maximumSpeed;
|
||||
|
||||
Profile(ra::profile& args)
|
||||
{
|
||||
Marshal::PtrToStructure(IntPtr(&args), this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue