Add --no-vd-destroy-content

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>
This commit is contained in:
Romain Vimont 2024-12-05 21:02:50 +01:00
commit 6c6607d404
12 changed files with 53 additions and 2 deletions

View file

@ -50,3 +50,14 @@ any default launcher UI available in virtual displays.
Note that if no app is started, no content will be rendered, so no video frame
will be produced at all.
## Destroy on close
By default, when the virtual display is closed, the running apps are destroyed.
To move them to the main display instead, use:
```
scrcpy --new-display --no-vd-destroy-content
```