Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Client/tool_mousemove.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static void show_help() {
" -y, --ypos Y position\n"
" -h, --help Display this help and exit\n"
"\n"
"Mouse wheel need to define two -w argument, first one for horizontal, second one for vertical.\n"
"You need to disable mouse speed acceleration for correct absolute movement."
);
}
Expand All @@ -70,17 +71,16 @@ int tool_mousemove(int argc, char **argv) {
static struct option long_options[] = {
{"absolute", no_argument, 0, 'a'},
{"help", no_argument, 0, 'h'},
{"wheel", no_argument, 0, 'w'},
{"wheel", required_argument, 0, 'w'},
{"xpos", required_argument, 0, 'x'},
{"ypos", required_argument, 0, 'y'},
{0, 0, 0, 0}
};
/* getopt_long stores the option index here. */
int option_index = 0;

c = getopt_long (argc, argv, "hawx:y:",
c = getopt_long (argc, argv, "haw:x:y:",
long_options, &option_index);

/* Detect the end of the options. */
if (c == -1)
break;
Expand All @@ -105,6 +105,8 @@ int tool_mousemove(int argc, char **argv) {

case 'w':
is_wheel = 1;
pos[i] = strtol(optarg, NULL, 10);
i++;
break;
case 'x':
pos[0] = strtol(optarg, NULL, 10);
Expand Down