Fix missing installer initialization

The current_process field of struct installer was not initialized.
Since the installer instance is static, its default value was 0.

The call to installer_stop() then called kill(0, SIGTERM) (on Linux),
which sent SIGTERM to every process in the process group. In particular,
the scrcpy process was killed.

As a consequence, the last cleanup steps, like disabling "show touches",
were not executed.

Fixes <https://github.com/Genymobile/scrcpy/issues/183>.
pull/194/head
Romain Vimont 6 years ago
parent 8890750681
commit 1a0139321b

@ -79,6 +79,8 @@ SDL_bool installer_init(struct installer *installer, const char *serial) {
installer->initialized = SDL_FALSE;
installer->stopped = SDL_FALSE;
installer->current_process = PROCESS_NONE;
return SDL_TRUE;
}

Loading…
Cancel
Save