mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-10-01 21:58:38 +00:00
Make virtual display presentable
With this flag, apps with baked in two-screen support can see the virtual display as an external display they can present to. PR #6344 <https://github.com/Genymobile/scrcpy/pull/6344> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
f663bbec12
commit
9d56d26d45
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ public class NewDisplayCapture extends SurfaceCapture {
|
|||
|
||||
// Internal fields copied from android.hardware.display.DisplayManager
|
||||
private static final int VIRTUAL_DISPLAY_FLAG_PUBLIC = android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC;
|
||||
private static final int VIRTUAL_DISPLAY_FLAG_PRESENTATION = android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PRESENTATION;
|
||||
private static final int VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY = android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
|
||||
private static final int VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH = 1 << 6;
|
||||
private static final int VIRTUAL_DISPLAY_FLAG_ROTATES_WITH_CONTENT = 1 << 7;
|
||||
|
@ -169,6 +170,7 @@ public class NewDisplayCapture extends SurfaceCapture {
|
|||
int virtualDisplayId;
|
||||
try {
|
||||
int flags = VIRTUAL_DISPLAY_FLAG_PUBLIC
|
||||
| VIRTUAL_DISPLAY_FLAG_PRESENTATION
|
||||
| VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
|
||||
| VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH
|
||||
| VIRTUAL_DISPLAY_FLAG_ROTATES_WITH_CONTENT;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue