summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/libutil.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-11-25 23:49:57 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-11-25 23:49:57 +0100
commitc3b6d548cd5c9b3abb738d485ab50b926733aae0 (patch)
tree8b15f75ae513ba50d5013764547e7ea74dbd9246 /crawl-ref/source/libutil.cc
parent5f077547fa1719e85543b7c6734a251bd364a680 (diff)
downloadcrawl-ref-c3b6d548cd5c9b3abb738d485ab50b926733aae0.tar.gz
crawl-ref-c3b6d548cd5c9b3abb738d485ab50b926733aae0.zip
Unbreak win32 tile builds.
Sadly, if this pseudo-signal ever happens, it will kill a game without saving.
Diffstat (limited to 'crawl-ref/source/libutil.cc')
-rw-r--r--crawl-ref/source/libutil.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/libutil.cc b/crawl-ref/source/libutil.cc
index d84110f2f7..a95bd0d36a 100644
--- a/crawl-ref/source/libutil.cc
+++ b/crawl-ref/source/libutil.cc
@@ -1197,9 +1197,13 @@ static BOOL WINAPI console_handler(DWORD sig)
if (crawl_state.seen_hups++)
return true; // abort immediately
+#ifndef USE_TILE_LOCAL
+ // Should never happen in tiles -- if it does (Cygwin?), this will
+ // kill the game without saving.
w32_insert_escape();
Sleep(15000); // allow 15 seconds for shutdown, then kill -9
+#endif
return true;
}
}
@@ -1207,8 +1211,8 @@ static BOOL WINAPI console_handler(DWORD sig)
void init_signals()
{
// If there's no console, this will return an error, which we ignore.
- // For GUI programs there's no controlling terminal, but there's no hurt in
- // blindly trying -- this way, we support Cygwin.
+ // For GUI programs there's no controlling terminal, but there might be
+ // one on Cygwin.
SetConsoleCtrlHandler(console_handler, true);
}