mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-17 05:24:19 +01:00
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.
This commit is contained in:
@@ -28,9 +28,6 @@ public class EventController {
|
|||||||
this.device = device;
|
this.device = device;
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
initPointer();
|
initPointer();
|
||||||
|
|
||||||
// on start, turn screen on
|
|
||||||
turnScreenOn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initPointer() {
|
private void initPointer() {
|
||||||
@@ -61,6 +58,9 @@ public class EventController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void control() throws IOException {
|
public void control() throws IOException {
|
||||||
|
// on start, turn screen on
|
||||||
|
turnScreenOn();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
handleEvent();
|
handleEvent();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user