From 15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 20 Oct 2011 23:19:32 +0000 Subject: Confirm quit game when the window close button is clicked a second time. Subversion-branch: /branches/v2-branch Subversion-revision: 2449 --- src/heretic/mn_menu.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/heretic') 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; } -- cgit v1.2.3