Keep the startup window open when CON compilation fails so people can copy CON errors out of it directly without looking at eduke32.log

git-svn-id: https://svn.eduke32.com/eduke32@851 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2008-07-10 05:37:36 +00:00
parent b442e26fb0
commit 681e58ccc4
3 changed files with 19 additions and 6 deletions

View file

@ -363,18 +363,21 @@ int startwin_close(void)
int startwin_puts(const char *buf) int startwin_puts(const char *buf)
{ {
const char *p = NULL, *q = NULL; const char *p = NULL, *q = NULL;
char workbuf[1024]; static char workbuf[1024];
static int newline = 0; static int newline = 0;
int curlen, linesbefore, linesafter; int curlen, linesbefore, linesafter;
HWND edctl; HWND edctl;
int vis; int vis;
static HWND dactrl = NULL;
if (!startupdlg) return 1; if (!startupdlg) return 1;
edctl = pages[TAB_MESSAGES]; edctl = pages[TAB_MESSAGES];
if (!edctl) return -1; if (!edctl) return -1;
vis = ((int)SendMessage(GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL), TCM_GETCURSEL,0,0) == TAB_MESSAGES); if (!dactrl) dactrl = GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL);
vis = ((int)SendMessage(dactrl, TCM_GETCURSEL,0,0) == TAB_MESSAGES);
if (vis) SendMessage(edctl, WM_SETREDRAW, FALSE,0); if (vis) SendMessage(edctl, WM_SETREDRAW, FALSE,0);
curlen = SendMessage(edctl, WM_GETTEXTLENGTH, 0,0); curlen = SendMessage(edctl, WM_GETTEXTLENGTH, 0,0);

View file

@ -5163,7 +5163,7 @@ void loadefs(const char *filenam)
{ {
if (groupfile != -1 && loadfromgrouponly == 0) if (groupfile != -1 && loadfromgrouponly == 0)
{ {
initprintf("Error(s) found in file `%s'. Do you want to use the INTERNAL DEFAULTS (y/N)?\n",filenam); // initprintf("Error(s) found in file `%s'. Do you want to use the INTERNAL DEFAULTS (y/N)?\n",filenam);
i=wm_ynbox("CON File Compilation Error", "Error(s) found in file `%s'. Do you want to use the " i=wm_ynbox("CON File Compilation Error", "Error(s) found in file `%s'. Do you want to use the "
"INTERNAL DEFAULTS?",filenam); "INTERNAL DEFAULTS?",filenam);
@ -5174,7 +5174,14 @@ void loadefs(const char *filenam)
loadfromgrouponly = 1; loadfromgrouponly = 1;
return; return;
} }
else gameexit(""); else
{
#if (defined RENDERTYPEWIN || (defined RENDERTYPESDL && !defined __APPLE__ && defined HAVE_GTK2))
while(!quitevent) // keep the window open so people can copy CON errors out of it
handleevents();
#endif
gameexit("");
}
} }
} }
} }

View file

@ -491,18 +491,21 @@ int startwin_close(void)
int startwin_puts(const char *buf) int startwin_puts(const char *buf)
{ {
const char *p = NULL, *q = NULL; const char *p = NULL, *q = NULL;
char workbuf[1024]; static char workbuf[1024];
static int newline = 0; static int newline = 0;
int curlen, linesbefore, linesafter; int curlen, linesbefore, linesafter;
HWND edctl; HWND edctl;
int vis; int vis;
static HWND dactrl = NULL;
if (!startupdlg) return 1; if (!startupdlg) return 1;
edctl = pages[TAB_MESSAGES]; edctl = pages[TAB_MESSAGES];
if (!edctl) return -1; if (!edctl) return -1;
vis = ((int)SendMessage(GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL), TCM_GETCURSEL,0,0) == TAB_MESSAGES); if (!dactrl) dactrl = GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL);
vis = ((int)SendMessage(dactrl, TCM_GETCURSEL,0,0) == TAB_MESSAGES);
if (vis) SendMessage(edctl, WM_SETREDRAW, FALSE,0); if (vis) SendMessage(edctl, WM_SETREDRAW, FALSE,0);
curlen = SendMessage(edctl, WM_GETTEXTLENGTH, 0,0); curlen = SendMessage(edctl, WM_GETTEXTLENGTH, 0,0);