@@ -112,6 +112,7 @@ extern qboolean keydown[256];
112112
113113extern cvar_t scr_fov ;
114114extern cvar_t scr_showfps ;
115+ extern cvar_t cl_confirmquit ;
115116extern cvar_t scr_style ;
116117extern cvar_t autoload ;
117118extern cvar_t autofastload ;
@@ -666,7 +667,7 @@ void M_Main_Key (int key)
666667 key_dest = key_game ;
667668 m_state = m_none ;
668669 cls .demonum = m_save_demonum ;
669- if (!fitzmode && ! cl_startdemos .value ) /* QuakeSpasm customization: */
670+ if (!cl_startdemos .value ) /* QuakeSpasm customization: */
670671 break ;
671672 if (cls .demonum != -1 && !cls .demoplayback && cls .state != ca_connected )
672673 CL_NextDemo ();
@@ -1395,6 +1396,7 @@ enum
13951396 GAME_OPT_AUTOLOAD ,
13961397 GAME_OPT_STARTUP_DEMOS ,
13971398 GAME_OPT_SHOWFPS ,
1399+ GAME_OPT_CONFIRMQUIT ,
13981400 GAME_OPTIONS_ITEMS
13991401};
14001402
@@ -1533,6 +1535,9 @@ static void M_GameOptions_AdjustSliders (int dir, qboolean mouse)
15331535 case GAME_OPT_SHOWFPS :
15341536 Cvar_SetValue ("scr_showfps" , ((int )scr_showfps .value + 2 + dir ) % 2 );
15351537 break ;
1538+ case GAME_OPT_CONFIRMQUIT :
1539+ Cvar_SetValue ("cl_confirmquit" , ((int )cl_confirmquit .value + 2 + dir ) % 2 );
1540+ break ;
15361541 }
15371542}
15381543
@@ -1688,6 +1693,11 @@ static void M_GameOptions_Draw (cb_context_t *cbx)
16881693 M_Print (cbx , MENU_LABEL_X , y , "Show FPS" );
16891694 M_DrawCheckbox (cbx , MENU_VALUE_X , y , scr_showfps .value );
16901695 break ;
1696+
1697+ case GAME_OPT_CONFIRMQUIT :
1698+ M_Print (cbx , MENU_LABEL_X , y , "Quit Prompt" );
1699+ M_DrawCheckbox (cbx , MENU_VALUE_X , y , cl_confirmquit .value );
1700+ break ;
16911701 }
16921702 }
16931703
@@ -3494,6 +3504,7 @@ static void M_Quit_Char (int key)
34943504
34953505 case 'y' :
34963506 case 'Y' :
3507+ case ' ' :
34973508 m_is_quitting = true;
34983509 IN_Deactivate (true);
34993510 key_dest = key_console ;
@@ -3513,10 +3524,13 @@ static qboolean M_Quit_TextEntry (void)
35133524static void M_Quit_Draw (cb_context_t * cbx ) // johnfitz -- modified for new quit message
35143525{
35153526 char msg1 [40 ];
3516- char msg2 [] = "by Axel Gneiting" ; /* msg2/msg3 are mostly [40] */
3517- char msg3 [] = "Press y to quit" ;
3527+ char msg2 [] = "by Axel Gneiting and devs " ; /* msg2/msg3 are mostly [40] */
3528+ char msg3 [] = "Press y/space to quit" ;
35183529 int boxlen ;
35193530
3531+ if (!cl_confirmquit .value )
3532+ return ;
3533+
35203534 if (was_in_menus )
35213535 {
35223536 m_state = m_quit_prevstate ;
@@ -4568,7 +4582,7 @@ void M_Draw (cb_context_t *cbx)
45684582 break ;
45694583
45704584 case m_quit :
4571- if (!fitzmode )
4585+ if (!cl_confirmquit . value )
45724586 { /* QuakeSpasm customization: */
45734587 /* Quit now! S.A. */
45744588 m_is_quitting = true;
0 commit comments