mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-24 14:40:07 +01:00
tools: require a minimum size for touchpads
This mostly aims to catch users trying to specify the size in inches. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
911106230a
commit
761687e995
1 changed files with 8 additions and 0 deletions
|
|
@ -240,6 +240,14 @@ int main (int argc, char **argv) {
|
|||
size.w <= 0 || size.h <= 0)
|
||||
return usage();
|
||||
|
||||
if (size.w < 30 || size.h < 30) {
|
||||
fprintf(stderr,
|
||||
"%dx%dmm is too small for a touchpad.\n"
|
||||
"Please specify the touchpad size in mm.\n",
|
||||
size.w, size.h);
|
||||
return 1;
|
||||
}
|
||||
|
||||
path = argv[2];
|
||||
if (path[0] == '-')
|
||||
return usage();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue