Use enum for key injection mode

There was only two key injection modes:
 - the default one
 - the mode with --prefer-text enabled

To prepare the addition of another mode (--raw-key-events), use an enum
instead of a bool.

PR #2831 <https://github.com/Genymobile/scrcpy/pull/2831>
This commit is contained in:
Romain Vimont
2021-11-26 22:05:28 +01:00
parent 0c0f62e4ab
commit 5e918ac0c3
6 changed files with 24 additions and 13 deletions

View File

@@ -18,7 +18,7 @@ struct sc_keyboard_inject {
// number of repetitions. This variable keeps track of the count.
unsigned repeat;
bool prefer_text;
enum sc_key_inject_mode key_inject_mode;
bool forward_key_repeat;
};