From 063cfd13269dc30fb6f20745b6b2ab5364fb2e1b Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 9 Feb 2018 14:00:46 +0100 Subject: [PATCH] Turn screen on in control() Turning the screen on is semantically associated to control(): only creating the EventController object should not turn the screen on. --- .../main/java/com/genymobile/scrcpy/EventController.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/src/main/java/com/genymobile/scrcpy/EventController.java b/server/src/main/java/com/genymobile/scrcpy/EventController.java index 0af1aed8..7c40cce0 100644 --- a/server/src/main/java/com/genymobile/scrcpy/EventController.java +++ b/server/src/main/java/com/genymobile/scrcpy/EventController.java @@ -28,9 +28,6 @@ public class EventController { this.device = device; this.connection = connection; initPointer(); - - // on start, turn screen on - turnScreenOn(); } private void initPointer() { @@ -61,6 +58,9 @@ public class EventController { } public void control() throws IOException { + // on start, turn screen on + turnScreenOn(); + while (true) { handleEvent(); }