mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Add --list-displays
Add an option to list the device displays properly.
This commit is contained in:
parent
2596ca02f0
commit
b65301f672
14 changed files with 69 additions and 28 deletions
|
|
@ -295,6 +295,10 @@ public final class Server {
|
|||
boolean listEncoders = Boolean.parseBoolean(value);
|
||||
options.setListEncoders(listEncoders);
|
||||
break;
|
||||
case "list_displays":
|
||||
boolean listDisplays = Boolean.parseBoolean(value);
|
||||
options.setListDisplays(listDisplays);
|
||||
break;
|
||||
case "send_device_meta":
|
||||
boolean sendDeviceMeta = Boolean.parseBoolean(value);
|
||||
options.setSendDeviceMeta(sendDeviceMeta);
|
||||
|
|
@ -354,14 +358,19 @@ public final class Server {
|
|||
|
||||
Ln.initLogLevel(options.getLogLevel());
|
||||
|
||||
if (options.getListEncoders()) {
|
||||
if (options.getListEncoders() || options.getListDisplays()) {
|
||||
if (options.getCleanup()) {
|
||||
CleanUp.unlinkSelf();
|
||||
}
|
||||
|
||||
Ln.i(LogUtils.buildVideoEncoderListMessage());
|
||||
Ln.i(LogUtils.buildAudioEncoderListMessage());
|
||||
// Just print the available encoders, do not mirror
|
||||
if (options.getListEncoders()) {
|
||||
Ln.i(LogUtils.buildVideoEncoderListMessage());
|
||||
Ln.i(LogUtils.buildAudioEncoderListMessage());
|
||||
}
|
||||
if (options.getListDisplays()) {
|
||||
Ln.i(LogUtils.buildDisplayListMessage());
|
||||
}
|
||||
// Just print the requested data, do not mirror
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue