Win32: "fix" handling of create_console(), hopefully clarifying usage of the corresponding prefs flag

svn path=/trunk/; revision=14735
This commit is contained in:
Ulf Lamping 2005-06-23 20:18:17 +00:00
parent 826107f6cf
commit 7d1f4d4dfa
1 changed files with 4 additions and 2 deletions

View File

@ -2599,7 +2599,7 @@ WinMain (struct HINSTANCE__ *hInstance,
void
create_console(void)
{
if (!has_console && prefs.gui_console_open != console_open_never) {
if (!has_console) {
/* We have no console to which to print the version string, so
create one and make it the standard input, output, and error. */
if (!AllocConsole())
@ -2662,7 +2662,9 @@ console_log_handler(const char *log_domain, GLogLevelFlags log_level,
today = localtime(&curr);
#ifdef _WIN32
create_console();
if (prefs.gui_console_open != console_open_never) {
create_console();
}
if (has_console) {
/* For some unknown reason, the above doesn't appear to actually cause
anything to be sent to the standard output, so we'll just splat the