mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-02 22:29:25 +00:00
Move file_handler initialization
This will allow to (properly) reference the controller from the file_handler initializer.
This commit is contained in:
parent
af228706f1
commit
310f5721d9
1 changed files with 6 additions and 8 deletions
|
@ -297,14 +297,6 @@ scrcpy(const struct scrcpy_options *options) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options->display && options->control) {
|
|
||||||
if (!file_handler_init(&s->file_handler, s->server.serial,
|
|
||||||
options->push_target)) {
|
|
||||||
goto end;
|
|
||||||
}
|
|
||||||
file_handler_initialized = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
struct decoder *dec = NULL;
|
struct decoder *dec = NULL;
|
||||||
bool needs_decoder = options->display;
|
bool needs_decoder = options->display;
|
||||||
#ifdef HAVE_V4L2
|
#ifdef HAVE_V4L2
|
||||||
|
@ -353,6 +345,12 @@ scrcpy(const struct scrcpy_options *options) {
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
controller_started = true;
|
controller_started = true;
|
||||||
|
|
||||||
|
if (!file_handler_init(&s->file_handler, s->server.serial,
|
||||||
|
options->push_target)) {
|
||||||
|
goto end;
|
||||||
|
}
|
||||||
|
file_handler_initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *window_title =
|
const char *window_title =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue