summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/doom/m_menu.c16
-rw-r--r--src/heretic/mn_menu.c15
-rw-r--r--src/hexen/mn_menu.c16
-rw-r--r--src/strife/m_menu.c15
4 files changed, 53 insertions, 9 deletions
diff --git a/src/doom/m_menu.c b/src/doom/m_menu.c
index bae11cc8..a21060b1 100644
--- a/src/doom/m_menu.c
+++ b/src/doom/m_menu.c
@@ -1310,7 +1310,6 @@ M_StartMessage
}
-
void M_StopMessage(void)
{
menuactive = messageLastMenuActive;
@@ -1447,8 +1446,19 @@ boolean M_Responder (event_t* ev)
// "close" button pressed on window?
if (ev->type == ev_quit)
{
- S_StartSound(NULL,sfx_swtchn);
- M_QuitDOOM(0);
+ // First click on close button = bring up quit confirm message.
+ // Second click on close button = confirm quit
+
+ if (menuactive && messageToPrint && messageRoutine == M_QuitResponse)
+ {
+ M_QuitResponse(key_menu_confirm);
+ }
+ else
+ {
+ S_StartSound(NULL,sfx_swtchn);
+ M_QuitDOOM(0);
+ }
+
return true;
}
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;
}
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;
}
diff --git a/src/strife/m_menu.c b/src/strife/m_menu.c
index 1593bdf2..2fa63abc 100644
--- a/src/strife/m_menu.c
+++ b/src/strife/m_menu.c
@@ -1686,8 +1686,19 @@ boolean M_Responder (event_t* ev)
// "close" button pressed on window?
if (ev->type == ev_quit)
{
- S_StartSound(NULL, sfx_swtchn);
- M_QuitStrife(0);
+ // First click on close button = bring up quit confirm message.
+ // Second click on close button = confirm quit
+
+ if (menuactive && messageToPrint && messageRoutine == M_QuitResponse)
+ {
+ M_QuitResponse(key_menu_confirm);
+ }
+ else
+ {
+ S_StartSound(NULL, sfx_swtchn);
+ M_QuitStrife(0);
+ }
+
return true;
}