dont attempt to show sdl message box on non dedicated builds running as dedicated
This commit is contained in:
1 parent
43d3ac102d
commit
073b35690b
1 file changed
+10
-7
+10
-7
@@ -1776,9 +1776,10 @@ FUNCNORETURN static ATTRNORETURN 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);
|
||||
@@ -1979,9 +1980,10 @@ FUNCIERROR void ATTRNORETURN 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,
|
||||
"SRB2Kart " VERSIONSTRING " Recursive Error",
|
||||
buffer, NULL);
|
||||
if (!M_CheckParm("-dedicated"))
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||
"SRB2Kart " VERSIONSTRING " Recursive Error",
|
||||
buffer, NULL);
|
||||
|
||||
W_Shutdown();
|
||||
exit(-1); // recursive errors detected
|
||||
@@ -2024,7 +2026,8 @@ FUNCIERROR void ATTRNORETURN 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, "SRB2Kart " VERSIONSTRING " Error", buffer, NULL);
|
||||
if (!M_CheckParm("-dedicated"))
|
||||
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "SRB2Kart " 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
|
||||
|
||||
Reference in new issue
Block a user