diff options
| author | a1xd <[email protected]> | 2020-12-03 22:42:29 -0500 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-12-03 22:42:29 -0500 |
| commit | c221eb3d62ccbd7f2a5203abd3e0eae8e9bf31e8 (patch) | |
| tree | 10f984c905084eae140d7eb15eb81592f50d537f /common/rawaccel.hpp | |
| parent | fix chart range not updating on disable (diff) | |
| download | rawaccel-c221eb3d62ccbd7f2a5203abd3e0eae8e9bf31e8.tar.xz rawaccel-c221eb3d62ccbd7f2a5203abd3e0eae8e9bf31e8.zip | |
add changes from review
rename some vars
prefer exceptions over assert
refactor poll rate field usage in MouseWatcher
Diffstat (limited to 'common/rawaccel.hpp')
| -rw-r--r-- | common/rawaccel.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp index a7b9144..3e049cb 100644 --- a/common/rawaccel.hpp +++ b/common/rawaccel.hpp @@ -233,7 +233,7 @@ namespace rawaccel { rotator rotate; vec2<accelerator> accels; vec2d sensitivity = { 1, 1 }; - vec2d negative_multipliers = {}; + vec2d directional_multipliers = {}; mouse_modifier(const settings& args, vec2<si_pair*> luts = {}) : combine_magnitudes(args.combine_mags) @@ -246,8 +246,8 @@ namespace rawaccel { if (args.sens.x != 0) sensitivity.x = args.sens.x; if (args.sens.y != 0) sensitivity.y = args.sens.y; - negative_multipliers.x = fabs(args.neg_multipliers.x); - negative_multipliers.y = fabs(args.neg_multipliers.y); + directional_multipliers.x = fabs(args.dir_multipliers.x); + directional_multipliers.y = fabs(args.dir_multipliers.y); if ((combine_magnitudes && args.modes.x == accel_mode::noaccel) || (args.modes.x == accel_mode::noaccel && @@ -293,11 +293,11 @@ namespace rawaccel { movement.x *= sensitivity.x; movement.y *= sensitivity.y; - if (negative_multipliers.x > 0 && movement.x < 0) { - movement.x *= negative_multipliers.x; + if (directional_multipliers.x > 0 && movement.x < 0) { + movement.x *= directional_multipliers.x; } - if (negative_multipliers.y > 0 && movement.y < 0) { - movement.y *= negative_multipliers.y; + if (directional_multipliers.y > 0 && movement.y < 0) { + movement.y *= directional_multipliers.y; } } |