summaryrefslogtreecommitdiff
path: root/src/doom/m_menu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/doom/m_menu.c')
-rw-r--r--src/doom/m_menu.c16
1 files changed, 13 insertions, 3 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;
}