Add an option to keep the device awake

Add an option to prevent the device to sleep:

    scrcpy --stay-awake
    scrcpy -w

The initial state is restored on exit.

Fixes #631 <https://github.com/Genymobile/scrcpy/issues/631>
This commit is contained in:
Romain Vimont
2020-05-02 01:54:48 +02:00
parent 828327365a
commit c77024314d
10 changed files with 93 additions and 15 deletions

View File

@@ -269,6 +269,7 @@ execute_server(struct server *server, const struct server_params *params) {
params->control ? "true" : "false",
display_id_string,
params->show_touches ? "true" : "false",
params->stay_awake ? "true" : "false",
};
#ifdef SERVER_DEBUGGER
LOGI("Server debugger waiting for a client on device port "