app: Catch CTRL + C signal on Windows attached console
This solves the second issue noted on the last paragraph of 9e795acb
This commit is contained in:
parent
5ff80c7dfb
commit
8913271706
1 changed files with 10 additions and 0 deletions
10
app/main.c
10
app/main.c
|
|
@ -959,6 +959,16 @@ gimp_attach_console_window (void)
|
|||
freopen ("CONOUT$", "w", stderr);
|
||||
_flushall ();
|
||||
|
||||
{
|
||||
/* CTRL+C handling */
|
||||
HANDLE hIn = GetStdHandle (STD_INPUT_HANDLE);
|
||||
DWORD mode;
|
||||
|
||||
GetConsoleMode (hIn, &mode);
|
||||
mode |= ENABLE_PROCESSED_INPUT;
|
||||
SetConsoleMode (hIn, mode);
|
||||
}
|
||||
|
||||
atexit (wait_console_window);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue