Power on the device only for main display
Power on the device on start only if scrcpy is mirroring the main display.
This commit is contained in:
parent
3ac4b64461
commit
f08a6d86c5
@ -166,7 +166,7 @@ public class Controller implements AsyncProcessor, VirtualDisplayListener {
|
||||
|
||||
private void control() throws IOException {
|
||||
// on start, power on the device
|
||||
if (powerOn && displayId != Device.DISPLAY_ID_NONE && !Device.isScreenOn()) {
|
||||
if (powerOn && displayId == 0 && !Device.isScreenOn()) {
|
||||
Device.pressReleaseKeycode(KeyEvent.KEYCODE_POWER, displayId, Device.INJECT_MODE_ASYNC);
|
||||
|
||||
// dirty hack
|
||||
|
Loading…
x
Reference in New Issue
Block a user