diff options
| author | a1xd <[email protected]> | 2021-07-06 16:36:13 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-07-06 16:36:13 -0400 |
| commit | 9efc361b55cd6fa62deaa0bb4942c773f43da6f2 (patch) | |
| tree | 7b728fbff41c4174e0bbb7a9f00050ea002b16e4 /common | |
| parent | use standard syntax for writer options (diff) | |
| download | rawaccel-9efc361b55cd6fa62deaa0bb4942c773f43da6f2.tar.xz rawaccel-9efc361b55cd6fa62deaa0bb4942c773f43da6f2.zip | |
allow p < 2 in Lp distance mode
Diffstat (limited to 'common')
| -rw-r--r-- | common/rawaccel.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp index fb2d81a..4e8b46c 100644 --- a/common/rawaccel.hpp +++ b/common/rawaccel.hpp @@ -162,10 +162,10 @@ namespace rawaccel { apply_dir_mul_x = directional_multipliers.x != 1; apply_dir_mul_y = directional_multipliers.y != 1; - if (!args.combine_mags) dist_mode = separate; - else if (p >= MAX_NORM) dist_mode = max; - else if (p > 2) dist_mode = Lp; - else dist_mode = euclidean; + if (!args.combine_mags) dist_mode = separate; + else if (p >= MAX_NORM || p <= 0) dist_mode = max; + else if (p != 2) dist_mode = Lp; + else dist_mode = euclidean; } mouse_modifier() = default; |