From 7bfdcb1598177d1bf68e73007020321ed23f67dc Mon Sep 17 00:00:00 2001 From: Darshan Shaligram Date: Thu, 22 Oct 2009 18:01:44 +0530 Subject: Fix Crawl pegging CPU when it sees HUP at the level-up stat gain prompt. --- crawl-ref/source/player.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/player.cc') diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index ea9b516513..eec79c0d66 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -3820,6 +3820,17 @@ static void _attribute_increase() switch (keyin) { +#if defined(USE_UNIX_SIGNALS) && defined(SIGHUP_SAVE) + case ESCAPE: + case -1: + // [ds] It's safe to save the game here; when the player + // reloads, the game will re-prompt for their level-up + // stat gain. + if (crawl_state.seen_hups) + sighup_save_and_exit(); + break; +#endif + case 's': case 'S': modify_stat(STAT_STRENGTH, 1, false, "level gain"); -- cgit v1.2.3-54-g00ecf