summaryrefslogtreecommitdiff
path: root/common/rawaccel-validate.hpp
diff options
context:
space:
mode:
authora1xd <[email protected]>2021-04-01 20:56:29 -0400
committera1xd <[email protected]>2021-04-01 20:56:29 -0400
commit3751ac95831412dbdf9de9744c0ef59c34033d3d (patch)
treeb4e52c16c7e5df1a9277398830abbe629ffb2b21 /common/rawaccel-validate.hpp
parentmake weights work in by component mode (diff)
downloadrawaccel-3751ac95831412dbdf9de9744c0ef59c34033d3d.tar.xz
rawaccel-3751ac95831412dbdf9de9744c0ef59c34033d3d.zip
add minimum to complement speed cap
important feature fixes some validation checks
Diffstat (limited to 'common/rawaccel-validate.hpp')
-rw-r--r--common/rawaccel-validate.hpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/rawaccel-validate.hpp b/common/rawaccel-validate.hpp
index a02324b..bccb21c 100644
--- a/common/rawaccel-validate.hpp
+++ b/common/rawaccel-validate.hpp
@@ -133,8 +133,11 @@ namespace rawaccel {
error("dpi"" must be positive");
}
- if (args.speed_cap <= 0) {
- error("speed cap"" must be positive");
+ if (args.speed_max < 0) {
+ error("speed cap is negative");
+ }
+ else if (args.speed_max < args.speed_min) {
+ error("max speed is less than min speed");
}
if (args.sens.x == 0 || args.sens.y == 0) {
@@ -147,7 +150,7 @@ namespace rawaccel {
}
if (args.dom_args.lp_norm <= 0) {
- error("Lp norm can not be negative");
+ error("Lp norm must be positive");
}
if (args.dir_multipliers.x < 0 || args.dir_multipliers.y < 0) {