mirror of
https://github.com/Genymobile/scrcpy
synced 2025-01-02 20:52:06 +00:00
Simplify virtual display video size
Do not use an unnecessary intermediate Rect object. PR #5370 <https://github.com/Genymobile/scrcpy/pull/5370>
This commit is contained in:
parent
12d5ca4d5e
commit
5851b62580
@ -126,9 +126,9 @@ public class ScreenCapture extends SurfaceCapture {
|
||||
}
|
||||
|
||||
try {
|
||||
Rect videoRect = screenInfo.getVideoSize().toRect();
|
||||
Size videoSize = screenInfo.getVideoSize();
|
||||
virtualDisplay = ServiceManager.getDisplayManager()
|
||||
.createVirtualDisplay("scrcpy", videoRect.width(), videoRect.height(), displayId, surface);
|
||||
.createVirtualDisplay("scrcpy", videoSize.getWidth(), videoSize.getHeight(), displayId, surface);
|
||||
Ln.d("Display: using DisplayManager API");
|
||||
} catch (Exception displayManagerException) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user