Copy server params
This is a preliminary step necessary to move the server to a separate thread.
This commit is contained in:
@@ -275,10 +275,6 @@ scrcpy(struct scrcpy_options *options) {
|
||||
|
||||
atexit(SDL_Quit);
|
||||
|
||||
if (!server_init(&s->server)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ret = false;
|
||||
|
||||
bool server_started = false;
|
||||
@@ -313,7 +309,12 @@ scrcpy(struct scrcpy_options *options) {
|
||||
.force_adb_forward = options->force_adb_forward,
|
||||
.power_off_on_close = options->power_off_on_close,
|
||||
};
|
||||
if (!server_start(&s->server, ¶ms)) {
|
||||
|
||||
if (!server_init(&s->server, ¶ms)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!server_start(&s->server)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -338,7 +339,7 @@ scrcpy(struct scrcpy_options *options) {
|
||||
}
|
||||
|
||||
if (options->display && options->control) {
|
||||
if (!file_handler_init(&s->file_handler, s->server.serial,
|
||||
if (!file_handler_init(&s->file_handler, options->serial,
|
||||
options->push_target)) {
|
||||
goto end;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user