- -norun works without -stdout now.

SVN r1487 (trunk)
This commit is contained in:
Randy Heit 2009-03-19 02:12:24 +00:00
parent c2aab5dd46
commit cfbf55acab

View file

@ -696,24 +696,32 @@ void RestoreConView()
void ShowErrorPane(const char *text)
{
if (Window == NULL || ConWindow == NULL)
{
if (text != NULL)
{
MessageBox (Window, text,
GAMESIG " Fatal Error", MB_OK|MB_ICONSTOP|MB_TASKMODAL);
}
return;
}
SetWindowText (Window, "Fatal Error - " WINDOW_TITLE);
if (StartScreen != NULL) // Ensure that the network pane is hidden.
{
StartScreen->NetDone();
}
if (text != NULL)
{
SetWindowText (Window, "Fatal Error - " WINDOW_TITLE);
ErrorIcon = CreateWindowEx (WS_EX_NOPARENTNOTIFY, "STATIC", NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | SS_OWNERDRAW, 0, 0, 0, 0, Window, NULL, g_hInst, NULL);
if (ErrorIcon != NULL)
{
SetWindowLong (ErrorIcon, GWL_ID, IDC_ICONPIC);
}
}
ErrorPane = CreateDialogParam (g_hInst, MAKEINTRESOURCE(IDD_ERRORPANE), Window, ErrorPaneProc, (LONG_PTR)NULL);
if (text != NULL)
{
CHARRANGE end;
CHARFORMAT2 oldformat, newformat;
PARAFORMAT2 paraformat;
@ -760,6 +768,7 @@ void ShowErrorPane(const char *text)
// The above line scrolled everything off the screen, so pretend to move the scroll
// bar thumb, which clamps to not show any extra lines if it doesn't need to.
SendMessage (ConWindow, EM_SCROLL, SB_PAGEDOWN, 0);
}
BOOL bRet;
MSG msg;
@ -1007,17 +1016,7 @@ void DoMain (HINSTANCE hInstance)
}
else if (StdOut == NULL)
{
BOOL bRet;
MSG msg;
RestoreConView();
while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0)
{
if (bRet == -1)
{
exit(0);
}
}
ShowErrorPane(NULL);
}
exit(0);
}