Skip to content

Commit

Permalink
Forbid --no-control in OTG mode
Browse files Browse the repository at this point in the history
The whole purpose of OTG is to only control the device.
  • Loading branch information
rom1v authored and Gottox committed Sep 29, 2024
1 parent d225175 commit 45e1dfa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,11 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
}

if (otg) {
if (!opts->control) {
LOGE("--no-control is not allowed in OTG mode");
return false;
}

enum sc_keyboard_input_mode kmode = opts->keyboard_input_mode;
if (kmode != SC_KEYBOARD_INPUT_MODE_AOA
&& kmode != SC_KEYBOARD_INPUT_MODE_DISABLED) {
Expand Down

0 comments on commit 45e1dfa

Please sign in to comment.