Do not pass scrcpy_options to keyboard inject

The components should be configurable independently of the global
scrcpy_options instance: their configuration could be provided
separately, like it is the case for example for some screen parameters.

For consistency, keyboard injection should not depend on scrcpy_options.
This commit is contained in:
Romain Vimont
2022-01-14 20:55:44 +01:00
parent 43aff4af73
commit 75655194fb
3 changed files with 8 additions and 5 deletions

View File

@@ -535,7 +535,8 @@ aoa_hid_end:
// keyboard_input_mode may have been reset if HID mode failed
if (options->keyboard_input_mode == SC_KEYBOARD_INPUT_MODE_INJECT) {
sc_keyboard_inject_init(&s->keyboard_inject, &s->controller,
options);
options->key_inject_mode,
options->forward_key_repeat);
kp = &s->keyboard_inject.key_processor;
}