mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-08-16 07:19:52 +00:00
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 <https://github.com/Genymobile/scrcpy/pull/6244> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
e47529ab9c
commit
8057835a0d
1 changed files with 1 additions and 1 deletions
|
@ -93,7 +93,7 @@ struct scrcpy {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
static BOOL WINAPI windows_ctrl_handler(DWORD ctrl_type) {
|
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);
|
sc_push_event(SDL_QUIT);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue