Skip to content

Display and control your Android device

Fix options alphabetical order

Romain Vimont0801cf062722
diff --git a/app/data/bash-completion/scrcpy b/app/data/bash-completion/scrcpy
index 97dbfe70..f94a70a6 100644
--- a/app/data/bash-completion/scrcpy
+++ b/app/data/bash-completion/scrcpy
@@ -19,8 +19,8 @@ _scrcpy() {
--crop=
-d --select-usb
--disable-screensaver
- --display-id=
--display-buffer=
+ --display-id=
-e --select-tcpip
-f --fullscreen
--force-adb-forward
diff --git a/app/data/zsh-completion/_scrcpy b/app/data/zsh-completion/_scrcpy
index 4b8a7737..cc58b866 100644
--- a/app/data/zsh-completion/_scrcpy
+++ b/app/data/zsh-completion/_scrcpy
@@ -26,8 +26,8 @@ arguments=(
'--crop=[\[width\:height\:x\:y\] Crop the device screen on the server]'
{-d,--select-usb}'[Use USB device]'
'--disable-screensaver[Disable screensaver while scrcpy is running]'
- '--display-id=[Specify the display id to mirror]'
'--display-buffer=[Add a buffering delay \(in milliseconds\) before displaying]'
+ '--display-id=[Specify the display id to mirror]'
{-e,--select-tcpip}'[Use TCP/IP device]'
{-f,--fullscreen}'[Start in fullscreen]'
'--force-adb-forward[Do not attempt to use \"adb reverse\" to connect to the device]'
diff --git a/app/scrcpy.1 b/app/scrcpy.1
index 26f53ba4..10c32ca1 100644
--- a/app/scrcpy.1
+++ b/app/scrcpy.1
@@ -127,6 +127,12 @@ Also see \fB\-e\fR (\fB\-\-select\-tcpip\fR).
.BI "\-\-disable-screensaver"
Disable screensaver while scrcpy is running.
+.TP
+.BI "\-\-display\-buffer ms
+Add a buffering delay (in milliseconds) before displaying. This increases latency to compensate for jitter.
+
+Default is 0 (no buffering).
+
.TP
.BI "\-\-display\-id " id
Specify the device display id to mirror.
@@ -135,12 +141,6 @@ The available display ids can be listed by \fB\-\-list\-displays\fR.
Default is 0.
-.TP
-.BI "\-\-display\-buffer ms
-Add a buffering delay (in milliseconds) before displaying. This increases latency to compensate for jitter.
-
-Default is 0 (no buffering).
-
.TP
.B \-e, \-\-select\-tcpip
Use TCP/IP device (if there is exactly one, like adb -e).
diff --git a/app/src/cli.c b/app/src/cli.c
index b402f6c5..12ed8111 100644
--- a/app/src/cli.c
+++ b/app/src/cli.c
@@ -292,6 +292,14 @@ static const struct sc_option options[] = {
.longopt = "display",
.argdesc = "id",
},
+ {
+ .longopt_id = OPT_DISPLAY_BUFFER,
+ .longopt = "display-buffer",
+ .argdesc = "ms",
+ .text = "Add a buffering delay (in milliseconds) before displaying. "
+ "This increases latency to compensate for jitter.\n"
+ "Default is 0 (no buffering).",
+ },
{
.longopt_id = OPT_DISPLAY_ID,
.longopt = "display-id",
@@ -301,14 +309,6 @@ static const struct sc_option options[] = {
" scrcpy --list-displays\n"
"Default is 0.",
},
- {
- .longopt_id = OPT_DISPLAY_BUFFER,
- .longopt = "display-buffer",
- .argdesc = "ms",
- .text = "Add a buffering delay (in milliseconds) before displaying. "
- "This increases latency to compensate for jitter.\n"
- "Default is 0 (no buffering).",
- },
{
.shortopt = 'e',
.longopt = "select-tcpip",