Add --list-displays

Add an option to list the device displays properly.
This commit is contained in:
Romain Vimont
2023-02-23 23:10:15 +01:00
parent 46169618a5
commit eb39365737
14 changed files with 69 additions and 28 deletions

View File

@@ -73,10 +73,9 @@ Disable screensaver while scrcpy is running.
.TP
.BI "\-\-display " id
Specify the display id to mirror.
Specify the device display id to mirror.
The list of possible display ids can be listed by "adb shell dumpsys display"
(search "mDisplayId=" in the output).
The available display ids can be listed by \-\-list\-displays.
Default is 0.
@@ -134,6 +133,10 @@ This is a workaround for some devices not behaving as expected when setting the
.B \-\-list\-encoders
List video and audio encoders available on the device.
.TP
.B \-\-list\-displays
List displays available on the device.
.TP
\fB\-\-lock\-video\-orientation\fR[=\fIvalue\fR]
Lock video orientation to \fIvalue\fR. Possible values are "unlocked", "initial" (locked to the initial orientation), 0, 1, 2 and 3. Natural device orientation is 0, and each increment adds a 90 degrees rotation counterclockwise.