mirror of
https://github.com/Genymobile/scrcpy
synced 2024-11-15 06:12:53 +00:00
Rename --display to --display-id
The option is named "display id" everywhere. This will be consistent with --camera-id (there will be many camera options, so an option --camera would be confusing).
This commit is contained in:
parent
b7ad652a75
commit
c79e0f6989
@ -13,7 +13,7 @@ _scrcpy() {
|
||||
--crop=
|
||||
-d --select-usb
|
||||
--disable-screensaver
|
||||
--display=
|
||||
--display-id=
|
||||
--display-buffer=
|
||||
-e --select-tcpip
|
||||
-f --fullscreen
|
||||
@ -140,7 +140,7 @@ _scrcpy() {
|
||||
|--audio-encoder \
|
||||
|--audio-output-buffer \
|
||||
|--crop \
|
||||
|--display \
|
||||
|--display-id \
|
||||
|--display-buffer \
|
||||
|--max-fps \
|
||||
|-m|--max-size \
|
||||
|
@ -20,7 +20,7 @@ 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=[Specify the display id to mirror]'
|
||||
'--display-id=[Specify the display id to mirror]'
|
||||
'--display-buffer=[Add a buffering delay \(in milliseconds\) before displaying]'
|
||||
{-e,--select-tcpip}'[Use TCP/IP device]'
|
||||
{-f,--fullscreen}'[Start in fullscreen]'
|
||||
|
@ -94,7 +94,7 @@ Also see \fB\-e\fR (\fB\-\-select\-tcpip\fR).
|
||||
Disable screensaver while scrcpy is running.
|
||||
|
||||
.TP
|
||||
.BI "\-\-display " id
|
||||
.BI "\-\-display\-id " id
|
||||
Specify the device display id to mirror.
|
||||
|
||||
The available display ids can be listed by \-\-list\-displays.
|
||||
|
@ -32,6 +32,7 @@ enum {
|
||||
OPT_WINDOW_BORDERLESS,
|
||||
OPT_MAX_FPS,
|
||||
OPT_LOCK_VIDEO_ORIENTATION,
|
||||
OPT_DISPLAY,
|
||||
OPT_DISPLAY_ID,
|
||||
OPT_ROTATION,
|
||||
OPT_RENDER_DRIVER,
|
||||
@ -232,9 +233,15 @@ static const struct sc_option options[] = {
|
||||
.text = "Disable screensaver while scrcpy is running.",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_DISPLAY_ID,
|
||||
// deprecated
|
||||
.longopt_id = OPT_DISPLAY,
|
||||
.longopt = "display",
|
||||
.argdesc = "id",
|
||||
},
|
||||
{
|
||||
.longopt_id = OPT_DISPLAY_ID,
|
||||
.longopt = "display-id",
|
||||
.argdesc = "id",
|
||||
.text = "Specify the device display id to mirror.\n"
|
||||
"The available display ids can be listed by:\n"
|
||||
" scrcpy --list-displays\n"
|
||||
@ -1702,6 +1709,9 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
case OPT_CROP:
|
||||
opts->crop = optarg;
|
||||
break;
|
||||
case OPT_DISPLAY:
|
||||
LOGW("--display is deprecated, use --display-id instead.");
|
||||
// fall through
|
||||
case OPT_DISPLAY_ID:
|
||||
if (!parse_display_id(optarg, &opts->display_id)) {
|
||||
return false;
|
||||
|
@ -143,7 +143,7 @@ If several displays are available on the Android device, it is possible to
|
||||
select the display to mirror:
|
||||
|
||||
```bash
|
||||
scrcpy --display=1
|
||||
scrcpy --display-id=1
|
||||
```
|
||||
|
||||
The list of display ids can be retrieved by:
|
||||
|
@ -47,7 +47,7 @@ public final class LogUtils {
|
||||
builder.append("\n (none)");
|
||||
} else {
|
||||
for (int id : displayIds) {
|
||||
builder.append("\n --display=").append(id).append(" (");
|
||||
builder.append("\n --display-id=").append(id).append(" (");
|
||||
DisplayInfo displayInfo = displayManager.getDisplayInfo(id);
|
||||
if (displayInfo != null) {
|
||||
Size size = displayInfo.getSize();
|
||||
|
Loading…
Reference in New Issue
Block a user