diff --git a/configure b/configure
index 0cdf7a4..2790ab1 100755
|
a
|
b
|
HAVE_LIST="
|
| 1244 | 1244 | sched_getaffinity |
| 1245 | 1245 | sdl |
| 1246 | 1246 | sdl_video_size |
| | 1247 | SetConsoleCtrlHandler |
| 1247 | 1248 | setmode |
| 1248 | 1249 | setrlimit |
| 1249 | 1250 | sndio_h |
| … |
… |
check_lib2 "windows.h psapi.h" GetProcessMemoryInfo -lpsapi
|
| 3153 | 3154 | check_func_headers windows.h GetProcessAffinityMask |
| 3154 | 3155 | check_func_headers windows.h GetProcessTimes |
| 3155 | 3156 | check_func_headers windows.h MapViewOfFile |
| | 3157 | check_func_headers windows.h SetConsoleCtrlHandler |
| 3156 | 3158 | check_func_headers windows.h VirtualAlloc |
| 3157 | 3159 | check_func_headers glob.h glob |
| 3158 | 3160 | |
diff --git a/ffmpeg.c b/ffmpeg.c
index 4d37424..b4258e1 100644
|
a
|
b
|
|
| | 1 | |
| 1 | 2 | /* |
| 2 | 3 | * Copyright (c) 2000-2003 Fabrice Bellard |
| 3 | 4 | * |
| … |
… |
|
| 72 | 73 | #include <windows.h> |
| 73 | 74 | #include <psapi.h> |
| 74 | 75 | #endif |
| | 76 | #ifdef HAVE_SETCONSOLECTRLHANDLER |
| | 77 | #include <windows.h> |
| | 78 | #endif |
| 75 | 79 | |
| 76 | 80 | #if HAVE_SYS_SELECT_H |
| 77 | 81 | #include <sys/select.h> |
| … |
… |
static void sigterm_handler(int sig)
|
| 1240 | 1244 | exit(123); |
| 1241 | 1245 | } |
| 1242 | 1246 | |
| | 1247 | #ifdef HAVE_SETCONSOLECTRLHANDLER |
| | 1248 | static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType) |
| | 1249 | { |
| | 1250 | switch (fdwCtrlType) |
| | 1251 | { |
| | 1252 | case CTRL_C_EVENT: |
| | 1253 | case CTRL_BREAK_EVENT: |
| | 1254 | sigterm_handler(SIGINT); |
| | 1255 | return TRUE; |
| | 1256 | |
| | 1257 | case CTRL_CLOSE_EVENT: |
| | 1258 | sigterm_handler(SIGTERM); |
| | 1259 | return TRUE; |
| | 1260 | |
| | 1261 | default: |
| | 1262 | return FALSE; |
| | 1263 | } |
| | 1264 | } |
| | 1265 | #endif |
| | 1266 | |
| 1243 | 1267 | static void term_init(void) |
| 1244 | 1268 | { |
| 1245 | 1269 | #if HAVE_TERMIOS_H |
| … |
… |
static void term_init(void)
|
| 1275 | 1299 | #ifdef SIGXCPU |
| 1276 | 1300 | signal(SIGXCPU, sigterm_handler); |
| 1277 | 1301 | #endif |
| | 1302 | |
| | 1303 | #ifdef HAVE_SETCONSOLECTRLHANDLER |
| | 1304 | SetConsoleCtrlHandler((PHANDLER_ROUTINE)CtrlHandler, TRUE); |
| | 1305 | #endif |
| 1278 | 1306 | } |
| 1279 | 1307 | |
| 1280 | 1308 | /* read a key without blocking */ |