Skip to content

Commit c2cb069

Browse files
committed
Reenable custom SDL signal handlers
This partially reverts commit f00c6c5. 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.
1 parent 0cb16be commit c2cb069

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

app/src/scrcpy.c

-4
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,6 @@ SDL_bool scrcpy(const struct scrcpy_options *options) {
155155

156156
SDL_bool ret = SDL_TRUE;
157157

158-
if (!SDL_SetHint(SDL_HINT_NO_SIGNAL_HANDLERS, "1")) {
159-
LOGW("Cannot request to keep default signal handlers");
160-
}
161-
162158
if (!sdl_init_and_configure()) {
163159
ret = SDL_FALSE;
164160
goto finally_destroy_server;

0 commit comments

Comments
 (0)