From b37ba0237d90d4f2bbd02c0e0e2ea769f4418adb Mon Sep 17 00:00:00 2001 From: tomaz Date: Sat, 21 Aug 2004 16:43:41 +0000 Subject: [PATCH] Made Sys_Error print the error message to the console / logfile. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4348 d7cf8633-e32d-0410-b094-e92efae38249 --- sys_linux.c | 4 ++++ sys_sdl.c | 4 ++++ sys_win.c | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/sys_linux.c b/sys_linux.c index 499aaada..1df663ae 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -44,6 +44,10 @@ void Sys_Error (const char *error, ...) va_end (argptr); fprintf(stderr, "Error: %s\n", string); + Con_Print ("Quake Error: "); + Con_Print (string); + Con_Print ("\n"); + Host_Shutdown (); exit (1); } diff --git a/sys_sdl.c b/sys_sdl.c index bc48f440..715d094b 100644 --- a/sys_sdl.c +++ b/sys_sdl.c @@ -46,6 +46,10 @@ void Sys_Error (const char *error, ...) va_end (argptr); fprintf(stderr, "Error: %s\n", string); + Con_Print ("Quake Error: "); + Con_Print (string); + Con_Print ("\n"); + Host_Shutdown (); exit (1); } diff --git a/sys_win.c b/sys_win.c index 8e3c628f..f53745e5 100644 --- a/sys_win.c +++ b/sys_win.c @@ -73,10 +73,14 @@ void Sys_Error (const char *error, ...) 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_error1) { in_sys_error1 = 1; -- 2.39.2