Implement keyboard/mouse control
To control the device from the computer: - retrieve mouse and keyboard SDL events; - convert them to Android events; - serialize them; - send them on the same socket used by the video stream (but in the opposite direction); - deserialize the events on the Android side; - inject them using the InputManager.
This commit is contained in:
@@ -3,6 +3,9 @@ project('scrcpy-app', 'c')
|
||||
src = [
|
||||
'src/scrcpy.c',
|
||||
'src/command.c',
|
||||
'src/control.c',
|
||||
'src/controlevent.c',
|
||||
'src/convert.c',
|
||||
'src/decoder.c',
|
||||
'src/frames.c',
|
||||
'src/lockutil.c',
|
||||
@@ -26,3 +29,17 @@ dependencies = [
|
||||
]
|
||||
|
||||
executable('scrcpy', src, dependencies: dependencies)
|
||||
|
||||
|
||||
### TESTS
|
||||
|
||||
tests = [
|
||||
['test_control_event_queue', ['tests/test_control_event_queue.c', 'src/controlevent.c']],
|
||||
]
|
||||
|
||||
src_dir = include_directories('src')
|
||||
|
||||
foreach t : tests
|
||||
exe = executable(t[0], t[1], include_directories: src_dir, dependencies: dependencies)
|
||||
test(t[0], exe)
|
||||
endforeach
|
||||
|
||||
Reference in New Issue
Block a user