mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Add --render-fit feature
Add an option to configure how the rendering fits the window. The default, `--render-fit=letterbox`, preserves the aspect ratio and fits the window as best as possible, adding black bars at the top/bottom or left/right if needed. This has been the only behavior scrcpy supported so far. Another mode, `--render-fit=disabled`, renders the display at the top-left corner without scaling. This mode will be useful for virtual display resizing.
This commit is contained in:
parent
3b068b669e
commit
f7c5f71ea0
9 changed files with 76 additions and 2 deletions
|
|
@ -80,6 +80,7 @@ _scrcpy() {
|
|||
--record-format=
|
||||
--record-orientation=
|
||||
--render-driver=
|
||||
--render-fit=
|
||||
--require-audio
|
||||
-s --serial=
|
||||
-S --turn-screen-off
|
||||
|
|
@ -176,6 +177,10 @@ _scrcpy() {
|
|||
COMPREPLY=($(compgen -W 'direct3d opengl opengles2 opengles metal software' -- "$cur"))
|
||||
return
|
||||
;;
|
||||
--render-fit)
|
||||
COMPREPLY=($(compgen -W 'letterbox disabled' -- "$cur"))
|
||||
return
|
||||
;;
|
||||
--shortcut-mod)
|
||||
# Only auto-complete a single key
|
||||
COMPREPLY=($(compgen -W 'lctrl rctrl lalt ralt lsuper rsuper' -- "$cur"))
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ arguments=(
|
|||
'--record-format=[Force recording format]:format:(mp4 mkv m4a mka opus aac flac wav)'
|
||||
'--record-orientation=[Set the record orientation]:orientation values:(0 90 180 270)'
|
||||
'--render-driver=[Request SDL to use the given render driver]:driver name:(direct3d opengl opengles2 opengles metal software)'
|
||||
'--render-fit=[Set the render fit mode]:mode:(letterbox disabled)'
|
||||
'--require-audio=[Make scrcpy fail if audio is enabled but does not work]'
|
||||
{-s,--serial=}'[The device serial number \(mandatory for multiple devices only\)]:serial:($("${ADB-adb}" devices | awk '\''$2 == "device" {print $1}'\''))'
|
||||
{-S,--turn-screen-off}'[Turn the device screen off immediately]'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue