summaryrefslogtreecommitdiff
path: root/src/hexen/mn_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hexen/mn_menu.c')
-rw-r--r--src/hexen/mn_menu.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/hexen/mn_menu.c b/src/hexen/mn_menu.c
index 0bd942a4..94f6b1a3 100644
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1162,8 +1162,20 @@ 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;
}