From 8057835a0d2913a45d7982bc4710a82b0a7f4fed Mon Sep 17 00:00:00 2001 From: Filip Buda Date: Sun, 20 Jul 2025 21:42:59 -0400 Subject: [PATCH] Catch CTRL_BREAK_EVENT signal on Windows This ensures the process can terminate properly when a CTRL_BREAK_EVENT signal is sent programmatically. PR #6244 Signed-off-by: Romain Vimont --- app/src/scrcpy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/scrcpy.c b/app/src/scrcpy.c index a4c8c340..aedfdf9c 100644 --- a/app/src/scrcpy.c +++ b/app/src/scrcpy.c @@ -93,7 +93,7 @@ struct scrcpy { #ifdef _WIN32 static BOOL WINAPI windows_ctrl_handler(DWORD ctrl_type) { - if (ctrl_type == CTRL_C_EVENT) { + if (ctrl_type == CTRL_C_EVENT || ctrl_type == CTRL_BREAK_EVENT) { sc_push_event(SDL_QUIT); return TRUE; }