summaryrefslogtreecommitdiff
path: root/src/heretic/mn_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/heretic/mn_menu.c')
-rw-r--r--src/heretic/mn_menu.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c
index 4db108cf..bba0da5c 100644
--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1066,8 +1066,19 @@ boolean MN_Responder(event_t * event)
// "close" button pressed on window?
if (event->type == ev_quit)
{
- SCQuitGame(0);
- S_StartSound(NULL, sfx_chat);
+ // First click on close = bring up quit confirm message.
+ // Second click = confirm quit.
+
+ if (!MenuActive && askforquit && typeofask == 1)
+ {
+ G_CheckDemoStatus();
+ I_Quit();
+ }
+ else
+ {
+ SCQuitGame(0);
+ S_StartSound(NULL, sfx_chat);
+ }
return true;
}