Skip to content

Commit

Permalink
Prevent to turn screen off if no control
Browse files Browse the repository at this point in the history
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 <#608>.
  • Loading branch information
rom1v committed Jun 20, 2019
1 parent 87d7a15 commit bfb3f08
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit bfb3f08

Please sign in to comment.