mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-12-18 14:04:20 +01:00
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:
@@ -155,10 +155,6 @@ SDL_bool scrcpy(const struct scrcpy_options *options) {
|
||||
|
||||
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()) {
|
||||
ret = SDL_FALSE;
|
||||
goto finally_destroy_server;
|
||||
|
||||
Reference in New Issue
Block a user