Reenable custom SDL signal handlers

This partially reverts commit f00c6c5b13.

On Ctrl+C, we need to execute cleanup code. For instance, if recording
is enabled, we need to write MP4 file trailer on exit.

Custom SDL signal handlers were disabled because it leaded to process
hanging on Ctrl+C during network calls on initialization, but now it
seems to work correctly, the network calls return immediately on signal.
This commit is contained in:
Romain Vimont 2018-11-10 14:01:57 +01:00
parent 475912a39c
commit d0e090e1f9

View file

@ -155,10 +155,6 @@ SDL_bool scrcpy(const struct scrcpy_options *options) {
SDL_bool ret = SDL_TRUE; SDL_bool ret = SDL_TRUE;
if (!SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1")) {
LOGW("Cannot request to keep default signal handlers");
}
if (!sdl_init_and_configure()) { if (!sdl_init_and_configure()) {
ret = SDL_FALSE; ret = SDL_FALSE;
goto finally_destroy_server; goto finally_destroy_server;