summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2011-10-21 21:37:53 +0000
committerSimon Howard2011-10-21 21:37:53 +0000
commit1b4ad12272d7250ed8d62d82fca5ca96161bb481 (patch)
tree1f8505a21a750879f6aaddfd1f4fe70d541ee400
parent48e858988f16109b81ce1c3b3e4d63c3565f25b3 (diff)
downloadchocolate-doom-1b4ad12272d7250ed8d62d82fca5ca96161bb481.tar.gz
chocolate-doom-1b4ad12272d7250ed8d62d82fca5ca96161bb481.tar.bz2
chocolate-doom-1b4ad12272d7250ed8d62d82fca5ca96161bb481.zip
Add command line parameter to disable the GUI pop-up window that appears
when an error occurs (or -timedemo finishes). Subversion-branch: /branches/v2-branch Subversion-revision: 2451
-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];