mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 15:02:01 +00:00
- -norun works without -stdout now.
SVN r1487 (trunk)
This commit is contained in:
parent
c2aab5dd46
commit
cfbf55acab
1 changed files with 53 additions and 54 deletions
|
@ -696,24 +696,32 @@ void RestoreConView()
|
||||||
void ShowErrorPane(const char *text)
|
void ShowErrorPane(const char *text)
|
||||||
{
|
{
|
||||||
if (Window == NULL || ConWindow == NULL)
|
if (Window == NULL || ConWindow == NULL)
|
||||||
|
{
|
||||||
|
if (text != NULL)
|
||||||
{
|
{
|
||||||
MessageBox (Window, text,
|
MessageBox (Window, text,
|
||||||
GAMESIG " Fatal Error", MB_OK|MB_ICONSTOP|MB_TASKMODAL);
|
GAMESIG " Fatal Error", MB_OK|MB_ICONSTOP|MB_TASKMODAL);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetWindowText (Window, "Fatal Error - " WINDOW_TITLE);
|
|
||||||
if (StartScreen != NULL) // Ensure that the network pane is hidden.
|
if (StartScreen != NULL) // Ensure that the network pane is hidden.
|
||||||
{
|
{
|
||||||
StartScreen->NetDone();
|
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);
|
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)
|
if (ErrorIcon != NULL)
|
||||||
{
|
{
|
||||||
SetWindowLong (ErrorIcon, GWL_ID, IDC_ICONPIC);
|
SetWindowLong (ErrorIcon, GWL_ID, IDC_ICONPIC);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ErrorPane = CreateDialogParam (g_hInst, MAKEINTRESOURCE(IDD_ERRORPANE), Window, ErrorPaneProc, (LONG_PTR)NULL);
|
ErrorPane = CreateDialogParam (g_hInst, MAKEINTRESOURCE(IDD_ERRORPANE), Window, ErrorPaneProc, (LONG_PTR)NULL);
|
||||||
|
|
||||||
|
if (text != NULL)
|
||||||
|
{
|
||||||
CHARRANGE end;
|
CHARRANGE end;
|
||||||
CHARFORMAT2 oldformat, newformat;
|
CHARFORMAT2 oldformat, newformat;
|
||||||
PARAFORMAT2 paraformat;
|
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
|
// 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.
|
// bar thumb, which clamps to not show any extra lines if it doesn't need to.
|
||||||
SendMessage (ConWindow, EM_SCROLL, SB_PAGEDOWN, 0);
|
SendMessage (ConWindow, EM_SCROLL, SB_PAGEDOWN, 0);
|
||||||
|
}
|
||||||
|
|
||||||
BOOL bRet;
|
BOOL bRet;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
@ -1007,17 +1016,7 @@ void DoMain (HINSTANCE hInstance)
|
||||||
}
|
}
|
||||||
else if (StdOut == NULL)
|
else if (StdOut == NULL)
|
||||||
{
|
{
|
||||||
BOOL bRet;
|
ShowErrorPane(NULL);
|
||||||
MSG msg;
|
|
||||||
|
|
||||||
RestoreConView();
|
|
||||||
while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0)
|
|
||||||
{
|
|
||||||
if (bRet == -1)
|
|
||||||
{
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue