mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-21 03:55:05 +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;
|
||||
}
|
||||
|
||||
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;
|
||||
bool needs_decoder = options->display;
|
||||
#ifdef HAVE_V4L2
|
||||
|
@ -353,6 +345,12 @@ scrcpy(const struct scrcpy_options *options) {
|
|||
goto end;
|
||||
}
|
||||
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 =
|
||||
|
|
Loading…
Add table
Reference in a new issue