summaryrefslogtreecommitdiff
path: root/src/heretic
diff options
context:
space:
mode:
authorSimon Howard2011-10-20 23:19:32 +0000
committerSimon Howard2011-10-20 23:19:32 +0000
commit15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70 (patch)
tree0eed440b0593e2d2ba9d4e35889d54bb1fafad75 /src/heretic
parent112bc3fcab6654c20bc980a04d377b5b03044067 (diff)
downloadchocolate-doom-15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70.tar.gz
chocolate-doom-15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70.tar.bz2
chocolate-doom-15f1bce94eec21fe9e11ee7e6745d01ccd4cfa70.zip
Confirm quit game when the window close button is clicked a second time.
Subversion-branch: /branches/v2-branch Subversion-revision: 2449
Diffstat (limited to 'src/heretic')
-rw-r--r--src/heretic/mn_menu.c15
1 files changed, 13 insertions, 2 deletions
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;
}