Skip to content

Display and control your Android device

Fix alphabetic order of cli args

Romain Vimontd40224f299b2
diff --git a/app/scrcpy.1 b/app/scrcpy.1
index 95d5133d..c513dc9a 100644
--- a/app/scrcpy.1
+++ b/app/scrcpy.1
@@ -97,18 +97,6 @@ Select the camera size by its aspect ratio (+/- 10%).
Possible values are "sensor" (use the camera sensor aspect ratio), "\fInum\fR:\fIden\fR" (e.g. "4:3") and "\fIvalue\fR" (e.g. "1.6").
-.TP
-.B \-\-camera\-high\-speed
-Enable high-speed camera capture mode.
-
-This mode is restricted to specific resolutions and frame rates, listed by \fB\-\-list\-camera\-sizes\fR.
-
-.TP
-.BI "\-\-camera\-id " id
-Specify the device camera id to mirror.
-
-The available camera ids can be listed by \fB\-\-list\-cameras\fR.
-
.TP
.BI "\-\-camera\-facing " facing
Select the device camera by its facing direction.
@@ -121,6 +109,18 @@ Specify the camera capture frame rate.
If not specified, Android's default frame rate (30 fps) is used.
+.TP
+.B \-\-camera\-high\-speed
+Enable high-speed camera capture mode.
+
+This mode is restricted to specific resolutions and frame rates, listed by \fB\-\-list\-camera\-sizes\fR.
+
+.TP
+.BI "\-\-camera\-id " id
+Specify the device camera id to mirror.
+
+The available camera ids can be listed by \fB\-\-list\-cameras\fR.
+
.TP
.BI "\-\-camera\-size " width\fRx\fIheight
Specify an explicit camera capture size.
diff --git a/app/src/cli.c b/app/src/cli.c
index 3f2d23cb..ee86b34b 100644
--- a/app/src/cli.c
+++ b/app/src/cli.c
@@ -255,14 +255,6 @@ static const struct sc_option options[] = {
"ratio), \"<num>:<den>\" (e.g. \"4:3\") or \"<value>\" (e.g. "
"\"1.6\")."
},
- {
- .longopt_id = OPT_CAMERA_ID,
- .longopt = "camera-id",
- .argdesc = "id",
- .text = "Specify the device camera id to mirror.\n"
- "The available camera ids can be listed by:\n"
- " scrcpy --list-cameras",
- },
{
.longopt_id = OPT_CAMERA_FACING,
.longopt = "camera-facing",
@@ -270,6 +262,14 @@ static const struct sc_option options[] = {
.text = "Select the device camera by its facing direction.\n"
"Possible values are \"front\", \"back\" and \"external\".",
},
+ {
+ .longopt_id = OPT_CAMERA_FPS,
+ .longopt = "camera-fps",
+ .argdesc = "value",
+ .text = "Specify the camera capture frame rate.\n"
+ "If not specified, Android's default frame rate (30 fps) is "
+ "used.",
+ },
{
.longopt_id = OPT_CAMERA_HIGH_SPEED,
.longopt = "camera-high-speed",
@@ -277,6 +277,14 @@ static const struct sc_option options[] = {
"This mode is restricted to specific resolutions and frame "
"rates, listed by --list-camera-sizes.",
},
+ {
+ .longopt_id = OPT_CAMERA_ID,
+ .longopt = "camera-id",
+ .argdesc = "id",
+ .text = "Specify the device camera id to mirror.\n"
+ "The available camera ids can be listed by:\n"
+ " scrcpy --list-cameras",
+ },
{
.longopt_id = OPT_CAMERA_SIZE,
.longopt = "camera-size",
@@ -284,12 +292,21 @@ static const struct sc_option options[] = {
.text = "Specify an explicit camera capture size.",
},
{
- .longopt_id = OPT_CAMERA_FPS,
- .longopt = "camera-fps",
+ .longopt_id = OPT_CAPTURE_ORIENTATION,
+ .longopt = "capture-orientation",
.argdesc = "value",
- .text = "Specify the camera capture frame rate.\n"
- "If not specified, Android's default frame rate (30 fps) is "
- "used.",
+ .text = "Set the capture video orientation.\n"
+ "Possible values are 0, 90, 180, 270, flip0, flip90, flip180 "
+ "and flip270, possibly prefixed by '@'.\n"
+ "The number represents the clockwise rotation in degrees; the "
+ "flip\" keyword applies a horizontal flip before the "
+ "rotation.\n"
+ "If a leading '@' is passed (@90) for display capture, then "
+ "the rotation is locked, and is relative to the natural device "
+ "orientation.\n"
+ "If '@' is passed alone, then the rotation is locked to the "
+ "initial device orientation.\n"
+ "Default is 0.",
},
{
// Not really deprecated (--codec has never been released), but without
@@ -479,23 +496,6 @@ static const struct sc_option options[] = {
.longopt = "list-encoders",
.text = "List video and audio encoders available on the device.",
},
- {
- .longopt_id = OPT_CAPTURE_ORIENTATION,
- .longopt = "capture-orientation",
- .argdesc = "value",
- .text = "Set the capture video orientation.\n"
- "Possible values are 0, 90, 180, 270, flip0, flip90, flip180 "
- "and flip270, possibly prefixed by '@'.\n"
- "The number represents the clockwise rotation in degrees; the "
- "flip\" keyword applies a horizontal flip before the "
- "rotation.\n"
- "If a leading '@' is passed (@90) for display capture, then "
- "the rotation is locked, and is relative to the natural device "
- "orientation.\n"
- "If '@' is passed alone, then the rotation is locked to the "
- "initial device orientation.\n"
- "Default is 0.",
- },
{
// deprecated
.longopt_id = OPT_LOCK_VIDEO_ORIENTATION,