Prevent to turn screen off if no control
If --no-control is set, then the controller is not initialized (both in the client and the server), so it is not possible to control the device to turn its screen off. See <https://github.com/Genymobile/scrcpy/issues/608>.
This commit is contained in:
parent
87d7a157a9
commit
bfb3f0842f
1 changed files with 5 additions and 0 deletions
|
@ -414,6 +414,11 @@ parse_args(struct args *args, int argc, char *argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
if (args->no_control && args->turn_screen_off) {
|
||||
LOGE("Cannot request to turn screen off if control is disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue