Add --no-cleanup option

It might be useful not to cleanup on exit, for example to leave the
screen turned off, or keep the server binary on the device (via the
server option "cleanup=false").

Fixes #1764 <https://github.com/Genymobile/scrcpy/issues/1764>
PR #3020 <https://github.com/Genymobile/scrcpy/pull/3020>
This commit is contained in:
Romain Vimont 2022-02-13 17:17:01 +01:00
commit ccbe370cc5
9 changed files with 46 additions and 5 deletions

View file

@ -244,6 +244,10 @@ execute_server(struct sc_server *server,
// By default, downsize_on_error is true
ADD_PARAM("downsize_on_error=false");
}
if (!params->cleanup) {
// By default, cleanup is true
ADD_PARAM("cleanup=false");
}
#undef ADD_PARAM