summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i_system.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/i_system.c b/src/i_system.c
index 38266c4f..328fd9f5 100644
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -319,6 +319,7 @@ void I_Error (char *error, ...)
{
va_list argptr;
atexit_listentry_t *entry;
+ boolean exit_gui_popup;
if (already_quitting)
{
@@ -351,9 +352,13 @@ void I_Error (char *error, ...)
entry = entry->next;
}
-
+
+ exit_gui_popup = !M_ParmExists("-nogui");
+
#ifdef _WIN32
// On Windows, pop up a dialog box with the error message.
+
+ if (exit_gui_popup)
{
char msgbuf[512];
wchar_t wmsgbuf[512];
@@ -372,7 +377,7 @@ void I_Error (char *error, ...)
#endif
#ifdef __MACOSX__
- if (!I_ConsoleStdout())
+ if (exit_gui_popup && !I_ConsoleStdout())
{
CFStringRef message;
char msgbuf[512];