From 6bd32b8eed243ead52015bcee7f8a52b75106769 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 11 Nov 2024 08:51:31 +0100 Subject: [PATCH] fix? --- .../main/java/com/genymobile/scrcpy/video/ScreenCapture.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java b/server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java index 31d27c55b9..c477144a00 100644 --- a/server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java +++ b/server/src/main/java/com/genymobile/scrcpy/video/ScreenCapture.java @@ -138,8 +138,9 @@ public void start(Surface surface) { .createVirtualDisplay("scrcpy", videoSize.getWidth(), videoSize.getHeight(), displayId, surface); } else { // density doesn't matter since this virtual display is only used for mirroring - virtualDisplay.resize(videoSize.getWidth(), videoSize.getHeight(), 1); virtualDisplay.setSurface(surface); + virtualDisplay.resize(videoSize.getWidth(), videoSize.getHeight(), 1); + } virtualDisplayId = virtualDisplay.getDisplay().getDisplayId(); Rect contentRect = new Rect(0, 0, videoSize.getWidth(), videoSize.getHeight());