ref: 1b4ad12272d7250ed8d62d82fca5ca96161bb481
parent: 48e858988f16109b81ce1c3b3e4d63c3565f25b3
author: Simon Howard <[email protected]>
date: Fri Oct 21 17:37:53 EDT 2011
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
--- a/src/i_system.c
+++ b/src/i_system.c
@@ -319,6 +319,7 @@
{
va_list argptr;
atexit_listentry_t *entry;
+ boolean exit_gui_popup;
if (already_quitting)
{
@@ -351,9 +352,13 @@
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 @@
#endif
#ifdef __MACOSX__
- if (!I_ConsoleStdout())
+ if (exit_gui_popup && !I_ConsoleStdout())
{
CFStringRef message;
char msgbuf[512];