From bfb3f0842f523b315ec92668bb15818fb3883bab Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Thu, 20 Jun 2019 10:59:19 +0200 Subject: [PATCH] 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 . --- app/src/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/src/main.c b/app/src/main.c index 7fd54ed6..ffa2f02d 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -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; }