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/hexen/mn_menu.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'src/hexen') 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; } -- cgit v1.2.3