mirror of
https://github.com/RawAccelOfficial/rawaccel.git
synced 2025-05-11 18:36:46 +02:00
fix input checks
only check for cap < offset if relevant modes are selected
This commit is contained in:
parent
4c4eabc0cb
commit
5f997e3658
1 changed files with 8 additions and 2 deletions
|
@ -77,8 +77,14 @@ namespace rawaccel {
|
|||
error("cap (output) can not be 0");
|
||||
}
|
||||
|
||||
if (args.cap.x > 0 && args.cap.x < args.input_offset ||
|
||||
args.cap.y > 0 && args.cap.y < args.output_offset) {
|
||||
if ((args.mode == accel_mode::classic &&
|
||||
args.cap.x > 0 &&
|
||||
args.cap.x < args.input_offset &&
|
||||
args.cap_mode != cap_mode::out) ||
|
||||
(args.mode == accel_mode::power &&
|
||||
args.cap.y > 0 &&
|
||||
args.cap.y < args.output_offset &&
|
||||
args.cap_mode != cap_mode::in)) {
|
||||
error("cap < offset");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue