X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=menu.c;h=8dd7693440103fa8333cea295a4d1fb8a5b3633b;hb=337c93beda229bafc22d45b87d65eeff967b8464;hp=33e01caac9a576e3f3de7b7202280e03e17914f2;hpb=f13419f00e3f8335e9a25498560a433597f28f50;p=xonotic%2Fdarkplaces.git diff --git a/menu.c b/menu.c index 33e01caa..8dd76934 100644 --- a/menu.c +++ b/menu.c @@ -2838,9 +2838,9 @@ video_resolution_t video_resolutions_hardcoded[] = // this is the number of the default mode (640x480) in the list above int video_resolutions_hardcoded_count = sizeof(video_resolutions_hardcoded) / sizeof(*video_resolutions_hardcoded) - 1; -#define VIDEO_ITEMS 11 +#define VIDEO_ITEMS 10 static int video_cursor = 0; -static int video_cursor_table[VIDEO_ITEMS] = {68, 88, 96, 104, 112, 120, 128, 136, 144, 152, 168}; +static int video_cursor_table[VIDEO_ITEMS] = {68, 88, 96, 104, 112, 120, 128, 136, 144, 152}; static int menu_video_resolution; video_resolution_t *video_resolutions; @@ -3287,7 +3287,7 @@ static void M_Quit_Key(cmd_state_t *cmd, int key, int ascii) case 'Y': case 'y': - Host_Quit_f(cmd); + host.state = host_shutdown; break; default: @@ -5212,6 +5212,10 @@ void MVM_error_cmd(const char *format, ...) va_start (argptr, format); dpvsnprintf (errorstring, sizeof(errorstring), format, argptr); va_end (argptr); + + if (host.framecount < 3) + Sys_Error("Menu_Error: %s\n", errorstring); + Con_Printf( "Menu_Error: %s\n", errorstring ); if( !processingError ) { @@ -5236,8 +5240,7 @@ void MVM_error_cmd(const char *format, ...) R_SelectScene( RST_CLIENT ); // Let video start at least - if(host.state != host_init) - Host_AbortCurrentFrame(); + Host_AbortCurrentFrame(); } static void MVM_begin_increase_edicts(prvm_prog_t *prog) @@ -5472,23 +5475,12 @@ static void Call_MR_ToggleMenu_f(cmd_state_t *cmd) MR_ToggleMenu(m); } -static qbool menu_active; - -static void MR_Start_f(cmd_state_t *cmd) -{ - if(menu_active || cls.state == ca_dedicated) - return; - MR_Init(); - -} - void MR_Init_Commands(void) { // set router console commands Cvar_RegisterVariable (&forceqmenu); Cvar_RegisterVariable (&menu_options_colorcontrol_correctionvalue); Cvar_RegisterVariable (&menu_progs); - Cmd_AddCommand(CF_CLIENT, "menu_start", MR_Start_f, "initialize the menu system"); Cmd_AddCommand(CF_CLIENT, "menu_restart", MR_Restart_f, "restart menu system (reloads menu.dat)"); Cmd_AddCommand(CF_CLIENT, "togglemenu", Call_MR_ToggleMenu_f, "opens or closes menu"); } @@ -5629,5 +5621,4 @@ void MR_Init(void) MR_SetRouting (true); else MR_SetRouting (false); - menu_active = true; }