mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
move block
This commit is contained in:
parent
df72f67b33
commit
5a9e8ec7ba
1 changed files with 10 additions and 10 deletions
|
|
@ -130,16 +130,6 @@ public final class Server {
|
|||
connection.sendDeviceMeta(Device.getDeviceName());
|
||||
}
|
||||
|
||||
if (control) {
|
||||
ControlChannel controlChannel = connection.getControlChannel();
|
||||
Controller controller = new Controller(device, controlChannel, cleanUp, options.getClipboardAutosync(), options.getPowerOn());
|
||||
device.setClipboardListener(text -> {
|
||||
DeviceMessage msg = DeviceMessage.createClipboard(text);
|
||||
controller.getSender().send(msg);
|
||||
});
|
||||
asyncProcessors.add(controller);
|
||||
}
|
||||
|
||||
if (audio) {
|
||||
AudioCodec audioCodec = options.getAudioCodec();
|
||||
AudioCapture audioCapture = new AudioCapture(options.getAudioSource());
|
||||
|
|
@ -169,6 +159,16 @@ public final class Server {
|
|||
asyncProcessors.add(surfaceEncoder);
|
||||
}
|
||||
|
||||
if (control) {
|
||||
ControlChannel controlChannel = connection.getControlChannel();
|
||||
Controller controller = new Controller(device, controlChannel, cleanUp, options.getClipboardAutosync(), options.getPowerOn());
|
||||
device.setClipboardListener(text -> {
|
||||
DeviceMessage msg = DeviceMessage.createClipboard(text);
|
||||
controller.getSender().send(msg);
|
||||
});
|
||||
asyncProcessors.add(controller);
|
||||
}
|
||||
|
||||
Completion completion = new Completion(asyncProcessors.size());
|
||||
for (AsyncProcessor asyncProcessor : asyncProcessors) {
|
||||
asyncProcessor.start((fatalError) -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue