mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
clean up
This commit is contained in:
parent
526e4a81ed
commit
ddaa33538a
3 changed files with 6 additions and 13 deletions
|
|
@ -31,7 +31,6 @@ public final class ControlMessage {
|
|||
|
||||
public static final int COPY_KEY_NONE = 0;
|
||||
public static final int COPY_KEY_COPY = 1;
|
||||
public static final int COPY_KEY_CUT = 2;
|
||||
|
||||
private int type;
|
||||
private String text;
|
||||
|
|
|
|||
|
|
@ -3,19 +3,13 @@ package com.genymobile.scrcpy.device;
|
|||
public final class NewDisplay {
|
||||
private Size size;
|
||||
private int dpi;
|
||||
private boolean resizable;
|
||||
private final boolean resizable;
|
||||
|
||||
public NewDisplay() {
|
||||
// Auto size and dpi, not resizable
|
||||
this.resizable = false;
|
||||
}
|
||||
|
||||
public NewDisplay(Size size, int dpi) {
|
||||
this.size = size;
|
||||
this.dpi = dpi;
|
||||
this.resizable = false;
|
||||
}
|
||||
|
||||
public NewDisplay(Size size, int dpi, boolean resizable) {
|
||||
this.size = size;
|
||||
this.dpi = dpi;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public class NewDisplayCapture extends SurfaceCapture {
|
|||
private Size mainDisplaySize;
|
||||
private int mainDisplayDpi;
|
||||
private int maxSize;
|
||||
private int displayImePolicy;
|
||||
private final int displayImePolicy;
|
||||
private final Rect crop;
|
||||
private final boolean captureOrientationLocked;
|
||||
private final Orientation captureOrientation;
|
||||
|
|
@ -63,7 +63,7 @@ public class NewDisplayCapture extends SurfaceCapture {
|
|||
private Size physicalSize; // the physical size of the display (without rotation)
|
||||
|
||||
private int dpi;
|
||||
private boolean resizable;
|
||||
private final boolean resizable;
|
||||
|
||||
public NewDisplayCapture(VirtualDisplayListener vdListener, Options options) {
|
||||
this.vdListener = vdListener;
|
||||
|
|
@ -297,13 +297,13 @@ public class NewDisplayCapture extends SurfaceCapture {
|
|||
|
||||
// Resize the virtual display
|
||||
virtualDisplay.resize(newWidth, newHeight, newDpi);
|
||||
|
||||
|
||||
// Update our internal state
|
||||
displaySize = new Size(newWidth, newHeight);
|
||||
dpi = newDpi;
|
||||
|
||||
|
||||
Ln.i("Resized display to: " + newWidth + "x" + newHeight + "/" + newDpi);
|
||||
|
||||
|
||||
// Trigger a reconfiguration
|
||||
invalidate();
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue