Skip to content

Display and control your Android device

Prevent to turn screen off if no control

Romain Vimontbfb3f0842f52
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;
}