Handle repeating keycodes

Initialize "repeat" count on key events.

PR #1519 <https://github.com/Genymobile/scrcpy/pull/1519>
Refs #1013 <https://github.com/Genymobile/scrcpy/pull/1013>

Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
xeropresence 2020-06-11 04:40:52 -04:00 committed by Romain Vimont
commit 3c1ed5d86c
10 changed files with 45 additions and 11 deletions

View file

@ -14,6 +14,11 @@ struct input_manager {
struct controller *controller;
struct video_buffer *video_buffer;
struct screen *screen;
// SDL reports repeated events as a boolean, but Android expects the actual
// number of repetitions. This variable keeps track of the count.
unsigned repeat;
bool prefer_text;
};