Add option to specify the initial window size

Add --window-width and --window-height parameters.

If only one is provided, the other is computed so that the aspect ratio
is preserved.
This commit is contained in:
Romain Vimont
2019-11-03 18:00:11 +01:00
parent b6e2f8ae00
commit 9fd7a80a89
6 changed files with 89 additions and 6 deletions

View File

@@ -388,7 +388,8 @@ scrcpy(const struct scrcpy_options *options) {
if (!screen_init_rendering(&screen, window_title, frame_size,
options->always_on_top, options->window_x,
options->window_y)) {
options->window_y, options->window_width,
options->window_height)) {
goto end;
}