From 0801cf062722064506f2353c2c9bcd3504c59281 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 20 Nov 2023 13:09:46 +0100 Subject: [PATCH] Fix options alphabetical order Renaming --display to --display-id broke the alphabetical order. Refs 23e116064dc97f2af843e764f13eebd54fab486d --- app/data/bash-completion/scrcpy | 2 +- app/data/zsh-completion/_scrcpy | 2 +- app/scrcpy.1 | 12 ++++++------ app/src/cli.c | 16 ++++++++-------- 4 files changed, 16 insertions(+), 16 deletions(-) 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",