mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-05-05 21:38:09 +02:00
tools: support --help in the ptraccel-debug tool
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
8540efc209
commit
f545cfa923
1 changed files with 7 additions and 1 deletions
|
|
@ -203,7 +203,8 @@ main(int argc, char **argv)
|
||||||
accel_profile_func_t profile = NULL;
|
accel_profile_func_t profile = NULL;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
OPT_MODE = 1,
|
OPT_HELP = 1,
|
||||||
|
OPT_MODE,
|
||||||
OPT_NEVENTS,
|
OPT_NEVENTS,
|
||||||
OPT_MAXDX,
|
OPT_MAXDX,
|
||||||
OPT_STEP,
|
OPT_STEP,
|
||||||
|
|
@ -216,6 +217,7 @@ main(int argc, char **argv)
|
||||||
int c;
|
int c;
|
||||||
int option_index = 0;
|
int option_index = 0;
|
||||||
static struct option long_options[] = {
|
static struct option long_options[] = {
|
||||||
|
{"help", 0, 0, OPT_HELP },
|
||||||
{"mode", 1, 0, OPT_MODE },
|
{"mode", 1, 0, OPT_MODE },
|
||||||
{"nevents", 1, 0, OPT_NEVENTS },
|
{"nevents", 1, 0, OPT_NEVENTS },
|
||||||
{"maxdx", 1, 0, OPT_MAXDX },
|
{"maxdx", 1, 0, OPT_MAXDX },
|
||||||
|
|
@ -232,6 +234,10 @@ main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
case OPT_HELP:
|
||||||
|
usage();
|
||||||
|
exit(0);
|
||||||
|
break;
|
||||||
case OPT_MODE:
|
case OPT_MODE:
|
||||||
if (streq(optarg, "accel"))
|
if (streq(optarg, "accel"))
|
||||||
print_accel = true;
|
print_accel = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue