Check options specific to SDK keyboard
Fail if an option specific to --keyboard=sdk is passed with another keyboard input mode.
This commit is contained in:
parent
8657930adb
commit
5b0eb374f8
@ -2605,6 +2605,23 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
}
|
||||
}
|
||||
|
||||
if (opts->keyboard_input_mode != SC_KEYBOARD_INPUT_MODE_SDK) {
|
||||
if (opts->key_inject_mode == SC_KEY_INJECT_MODE_TEXT) {
|
||||
LOGE("--prefer-text is specific to --keyboard=sdk");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (opts->key_inject_mode == SC_KEY_INJECT_MODE_RAW) {
|
||||
LOGE("--raw-key-events is specific to --keyboard=sdk");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!opts->forward_key_repeat) {
|
||||
LOGE("--no-key-repeat is specific to --keyboard=sdk");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if ((opts->tunnel_host || opts->tunnel_port) && !opts->force_adb_forward) {
|
||||
LOGI("Tunnel host/port is set, "
|
||||
"--force-adb-forward automatically enabled.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user