From 9c0b9e9bf48754ac5984a5eb5682fc869bb98277 Mon Sep 17 00:00:00 2001 From: havoc Date: Thu, 25 Nov 2004 01:24:00 +0000 Subject: [PATCH] changed Sys_Error to not put up a messagebox if in dedicated mode, and cleaned it up a bit git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4784 d7cf8633-e32d-0410-b094-e92efae38249 --- sys_win.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sys_win.c b/sys_win.c index e261d04d..c2892da9 100644 --- a/sys_win.c +++ b/sys_win.c @@ -64,22 +64,26 @@ void Sys_Error (const char *error, ...) static int in_sys_error0 = 0; static int in_sys_error1 = 0; static int in_sys_error2 = 0; + static int in_sys_error3 = 0; va_start (argptr, error); vsnprintf (text, sizeof (text), error, argptr); va_end (argptr); + Con_Printf ("Quake Error: %s\n", text); + // close video so the message box is visible, unless we already tried that if (!in_sys_error0 && cls.state != ca_dedicated) { in_sys_error0 = 1; - VID_Shutdown(); + VID_Shutdown(); } - MessageBox(NULL, text, "Quake Error", MB_OK | MB_SETFOREGROUND | MB_ICONSTOP); - Con_Print ("Quake Error: "); - Con_Print (text); - Con_Print ("\n"); + if (!in_sys_error3 && cls.state != ca_dedicated) + { + in_sys_error3 = true; + MessageBox(NULL, text, "Quake Error", MB_OK | MB_SETFOREGROUND | MB_ICONSTOP); + } if (!in_sys_error1) { @@ -91,7 +95,7 @@ void Sys_Error (const char *error, ...) if (!in_sys_error2) { in_sys_error2 = 1; - DeinitConProc (); + Sys_Shutdown (); } exit (1); -- 2.39.2