mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-04 16:25:14 +00:00
move block
This commit is contained in:
@@ -130,16 +130,6 @@ public final class Server {
|
|||||||
connection.sendDeviceMeta(Device.getDeviceName());
|
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) {
|
if (audio) {
|
||||||
AudioCodec audioCodec = options.getAudioCodec();
|
AudioCodec audioCodec = options.getAudioCodec();
|
||||||
AudioCapture audioCapture = new AudioCapture(options.getAudioSource());
|
AudioCapture audioCapture = new AudioCapture(options.getAudioSource());
|
||||||
@@ -169,6 +159,16 @@ public final class Server {
|
|||||||
asyncProcessors.add(surfaceEncoder);
|
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());
|
Completion completion = new Completion(asyncProcessors.size());
|
||||||
for (AsyncProcessor asyncProcessor : asyncProcessors) {
|
for (AsyncProcessor asyncProcessor : asyncProcessors) {
|
||||||
asyncProcessor.start((fatalError) -> {
|
asyncProcessor.start((fatalError) -> {
|
||||||
|
Reference in New Issue
Block a user