A better location for this? + comment

This commit is contained in:
William McBrine
2018-01-02 16:49:43 -05:00
parent 49bbcee653
commit 0c232d8a22

View File

@@ -366,6 +366,7 @@ int PDC_scr_open(int argc, char **argv)
const char *str;
CONSOLE_SCREEN_BUFFER_INFO csbi;
HMODULE h_kernel;
BOOL result;
int i;
PDC_LOG(("PDC_scr_open() - called\n"));
@@ -448,12 +449,7 @@ int PDC_scr_open(int argc, char **argv)
pdc_con_out = std_con_out;
}
else
{
BOOL result = SetConsoleMode(pdc_con_out, 0x0010);
if (result)
SP->termattrs |= A_PROTECT|A_REVERSE;
SP->_restore = PDC_RESTORE_BUFFER;
}
}
xcpt_filter = SetUnhandledExceptionFilter(_restore_console);
@@ -461,6 +457,11 @@ int PDC_scr_open(int argc, char **argv)
SP->_preserve = (getenv("PDC_PRESERVE_SCREEN") != NULL);
/* ENABLE_LVB_GRID_WORLDWIDE */
result = SetConsoleMode(pdc_con_out, 0x0010);
if (result)
SP->termattrs |= A_PROTECT|A_REVERSE;
PDC_reset_prog_mode();
SP->mono = FALSE;