Throw error when --dpad-as-button and --dpad-only are combined
This commit is contained in:
parent
2b40bf8870
commit
0f2b94f63f
2 changed files with 13 additions and 0 deletions
7
TODO
7
TODO
|
@ -1,3 +1,10 @@
|
|||
- Test cases:
|
||||
|
||||
* default, test all axis and buttons
|
||||
* --dpad-only check that X/Y act properly
|
||||
* --dpad-as-button check buttons are working and no useless axis present
|
||||
|
||||
|
||||
Stuff to do before 0.5 release:
|
||||
===============================
|
||||
|
||||
|
|
|
@ -680,10 +680,16 @@ void parse_command_line(int argc, char** argv, CommandLineOptions& opts)
|
|||
}
|
||||
else if (strcmp("--dpad-only", argv[i]) == 0)
|
||||
{
|
||||
if (opts.uinput_config.dpad_as_button)
|
||||
throw std::runtime_error("Can't combine --dpad-as-button with --dpad-only");
|
||||
|
||||
opts.uinput_config.dpad_only = true;
|
||||
}
|
||||
else if (strcmp("--dpad-as-button", argv[i]) == 0)
|
||||
{
|
||||
if (opts.uinput_config.dpad_only)
|
||||
throw std::runtime_error("Can't combine --dpad-as-button with --dpad-only");
|
||||
|
||||
opts.uinput_config.dpad_as_button = true;
|
||||
}
|
||||
else if (strcmp("--deadzone", argv[i]) == 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue