Skip to content
Snippets Groups Projects
Commit c49dd5f5 authored by Golden's avatar Golden
Browse files

Make dedicated servers not pop up that annoying SDL error window

So they don't mess with shell scripts that expect SRB2 to exit when it crashes (like most other programs)
parent 93512ae9
No related branches found
No related tags found
1 merge request!1735Disable SDL error message on dedicated servers
......@@ -358,9 +358,10 @@ static void I_ReportSignal(int num, int coredumped)
I_OutputMsg("\nProcess killed by signal: %s\n\n", sigmsg);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Process killed by signal",
sigmsg, NULL);
if (!M_CheckParm("-dedicated"))
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Process killed by signal",
sigmsg, NULL);
}
#ifndef NEWSIGNALHANDLER
......@@ -2202,9 +2203,10 @@ static void newsignalhandler_Warn(const char *pr)
I_OutputMsg("%s\n", text);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Startup error",
text, NULL);
if (!M_CheckParm("-dedicated"))
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"Startup error",
text, NULL);
I_ShutdownConsole();
exit(-1);
......@@ -2405,9 +2407,10 @@ void I_Error(const char *error, ...)
// Implement message box with SDL_ShowSimpleMessageBox,
// which should fail gracefully if it can't put a message box up
// on the target system
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"SRB2 "VERSIONSTRING" Recursive Error",
buffer, NULL);
if (!M_CheckParm("-dedicated"))
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"SRB2 "VERSIONSTRING" Recursive Error",
buffer, NULL);
W_Shutdown();
exit(-1); // recursive errors detected
......@@ -2449,9 +2452,10 @@ void I_Error(const char *error, ...)
// Implement message box with SDL_ShowSimpleMessageBox,
// which should fail gracefully if it can't put a message box up
// on the target system
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"SRB2 "VERSIONSTRING" Error",
buffer, NULL);
if (!M_CheckParm("-dedicated"))
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
"SRB2 "VERSIONSTRING" Error",
buffer, NULL);
// Note that SDL_ShowSimpleMessageBox does *not* require SDL to be
// initialized at the time, so calling it after SDL_Quit() is
// perfectly okay! In addition, we do this on purpose so the
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment