Set initial fullscreen from screen.c

mouse_buttons
Romain Vimont 3 years ago
parent c6d7f5ee96
commit 65c4f487b3

@ -394,6 +394,7 @@ scrcpy(const struct scrcpy_options *options) {
.window_borderless = options->window_borderless,
.rotation = options->rotation,
.mipmaps = options->mipmaps,
.fullscreen = options->fullscreen,
};
if (!screen_init(&screen, &video_buffer, &fps_counter,
@ -411,10 +412,6 @@ scrcpy(const struct scrcpy_options *options) {
LOGW("Could not request 'set screen power mode'");
}
}
if (options->fullscreen) {
screen_switch_fullscreen(&screen);
}
}
// now we consumed the header values, the socket receives the video stream

@ -362,6 +362,10 @@ screen_init(struct screen *screen, struct video_buffer *vb,
screen_update_content_rect(screen);
if (params->fullscreen) {
screen_switch_fullscreen(screen);
}
return true;
}

@ -52,6 +52,8 @@ struct screen_params {
uint8_t rotation;
bool mipmaps;
bool fullscreen;
};
// initialize screen, create window, renderer and texture (window is hidden)

Loading…
Cancel
Save