Add an option to disable the following flag for virtual displays:
DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL
With this option, when the virtual display is closed, the running apps
are moved to the main display rather than being destroyed.
PR #5615 <https://github.com/Genymobile/scrcpy/pull/5615>
When running scrcpy with --tcpip=xx.xx.xx.xx, to make sure a new working
connection is established, it was first disconnected by a call to:
adb disconnect <addr>
However, this caused all running instances connected to that address to
be killed. Running several instances of scrcpy on the same device is now
useful with virtual displays, so change the default behavior to NOT
disconnect.
To force a reconnection, a '+' prefix can be added:
scrcpy --tcpip=+192.168.0.x
Fixes#5562 <https://github.com/Genymobile/scrcpy/issues/5562>
Allow capturing virtual displays at a lower resolution using
-m/--max-size.
In the original implementation in #5370, the virtual display size was
necessarily the same as the capture size. The --max-size value was only
allowed to determine the virtual display size when no explicit size was
provided.
Since the dpi was scaled down accordingly, it is often better to create
a virtual display at the target capture size directly. However, not
everything is rendered according to the virtual display DPI. For
example, a page in Firefox is rendered too big on small virtual
displays. Thus, it makes sense to be able create a virtual display at a
given size, and capture it at a lower resolution with --max-size. This
is now possible using OpenGL filters.
Therefore, change the behavior of --max-size for virtual displays:
- --max-size does not impact --new-display without size argument
anymore (the virtual display size is the main display size);
- it is used to limit the capture size (whether an explicit size is
provided or not).
This new behavior is consistent with main display capture.
Refs #5370 comment <https://github.com/Genymobile/scrcpy/pull/5370#issuecomment-2438944401>
Refs #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
PR #5506 <https://github.com/Genymobile/scrcpy/pull/5506>
Add an option to disable the following flag for virtual displays:
DisplayManager.VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS
Some devices render a broken UI when this flag is enabled.
Fixes#5494 <https://github.com/Genymobile/scrcpy/issues/5494>
Deprecate --lock-video-orientation in favor of a more general option
--capture-orientation, which supports all possible orientations
(0, 90, 180, 270, flip0, flip90, flip180, flip270), and a "locked" flag
via a '@' prefix.
All the old "locked video orientations" are supported:
- --lock-video-orientation -> --capture-orientation=@
- --lock-video-orientation=0 -> --capture-orientation=@0
- --lock-video-orientation=90 -> --capture-orientation=@90
- --lock-video-orientation=180 -> --capture-orientation=@180
- --lock-video-orientation=270 -> --capture-orientation=@270
In addition, --capture-orientation can rotate/flip the display without
locking, so that it follows the physical device rotation.
For example:
scrcpy --capture-orientation=flip90
always flips and rotates the capture by 90° clockwise.
The arguments are consistent with --display-orientation and
--record-orientation and --orientation (which provide separate
client-side orientation settings).
Refs #4011 <https://github.com/Genymobile/scrcpy/issues/4011>
PR #5455 <https://github.com/Genymobile/scrcpy/pull/5455>
Reset video capture/encoding on MOD+Shift+r.
Like on device rotation, this starts a new encoding session which
produces a video stream starting by a key frame.
PR #5432 <https://github.com/Genymobile/scrcpy/pull/5432>
Add secondary bindings (Shift+click) for mouse buttons.
In addition to:
--mouse-bind=xxxx
It is now possible to pass a sequence of secondary bindings:
--mouse-bind=xxxx:xxxx
<--> <-->
primary secondary
bindings bindings
If the second sequence is omitted, then it is the same as the first one.
By default, for SDK mouse, primary bindings trigger shortcuts and
secondary bindings forward all clicks.
For AOA and UHID, the default bindings are reversed: all clicks are
forwarded by default, whereas pressing Shift+click trigger shortcuts.
--mouse-bind=bhsn:++++ # default for SDK
--mouse-bind=++++:bhsn # default for AOA and UHID
Refs 035d60cf5d
Refs f5e6b8092aFixes#5055 <https://github.com/Genymobile/scrcpy/issues/5055>
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>
By default, only the left click is forwarded to the device, and
secondary clicks trigger shortcuts (the behavior can be configured by
--mouse-bind=xxxx).
But when the mouse mode is relative (AOA and UHID modes), forward all
clicks by default. This makes more sense since the cursor is handled on
the device side, the user expects all mouse buttons to be forwarded.
Refs <https://github.com/Genymobile/scrcpy/issues/4727#issuecomment-2069869750>
PR #5022 <https://github.com/Genymobile/scrcpy/pull/5022>
Add a new option --mouse-bind=xxxx.
The argument must be exactly 4 characters, one for each secondary click:
--mouse-bind=xxxx
^^^^
||||
||| `- 5th click
|| `-- 4th click
| `--- middle click
`---- right click
Each character must be one of the following:
- `+`: forward the click to the device
- `-`: ignore the click
- `b`: trigger shortcut BACK (or turn screen on if off)
- `h`: trigger shortcut HOME
- `s`: trigger shortcut APP_SWITCH
- `n`: trigger shortcut "expand notification panel"
This deprecates --forward-all-clicks (use --mouse-bind=++++ instead).
Refs <https://github.com/Genymobile/scrcpy/pull/2258#issuecomment-2182394460>
PR #5022 <https://github.com/Genymobile/scrcpy/pull/5022>
Restrict shortcut modifiers to be composed of only one item each.
Before, it was possible to select a list of multiple combinations of
modifier keys, like --shortcut-mod='lctrl+lalt,rctrl+rsuper', meaning
that shortcuts would be triggered either by LCtrl+LAlt+key or
RCtrl+RSuper+key.
This was overly generic, probably not used very much, and it prevents to
solve inconsistencies between UP and DOWN events of modifier keys sent
to the device.
Refs #4732 <https://github.com/Genymobile/scrcpy/issues/4732>
PR #4741 <https://github.com/Genymobile/scrcpy/pull/4741>