mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-07-31 05:08:59 +00:00
Extract keyboard processor trait
This will allow to provide alternative key processors.
This commit is contained in:
parent
056d36ce4a
commit
bcf5a9750f
9 changed files with 335 additions and 227 deletions
|
@ -11,18 +11,15 @@
|
|||
#include "fps_counter.h"
|
||||
#include "scrcpy.h"
|
||||
#include "screen.h"
|
||||
#include "trait/key_processor.h"
|
||||
|
||||
struct input_manager {
|
||||
struct controller *controller;
|
||||
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;
|
||||
struct sc_key_processor *kp;
|
||||
|
||||
bool control;
|
||||
bool forward_key_repeat;
|
||||
bool prefer_text;
|
||||
bool forward_all_clicks;
|
||||
bool legacy_paste;
|
||||
|
||||
|
@ -43,7 +40,8 @@ struct input_manager {
|
|||
|
||||
void
|
||||
input_manager_init(struct input_manager *im, struct controller *controller,
|
||||
struct screen *screen, const struct scrcpy_options *options);
|
||||
struct screen *screen, struct sc_key_processor *kp,
|
||||
const struct scrcpy_options *options);
|
||||
|
||||
bool
|
||||
input_manager_handle_event(struct input_manager *im, SDL_Event *event);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue