app, libgimp: Fix truncation and lack of color on attached Windows console
This commit is contained in:
parent
dc3cda93cb
commit
c79bf5790d
2 changed files with 6 additions and 4 deletions
|
|
@ -955,8 +955,9 @@ gimp_attach_console_window (void)
|
|||
/* If run on native shell, attach to it */
|
||||
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0)
|
||||
{
|
||||
freopen ("CONOUT$", "w", stdout);
|
||||
freopen ("CONOUT$", "w", stderr);
|
||||
/* 'r' is needed to prevent interleaving and '+' to support colors */
|
||||
freopen ("CONOUT$", "r+", stdout);
|
||||
freopen ("CONOUT$", "r+", stderr);
|
||||
_flushall ();
|
||||
|
||||
{
|
||||
|
|
|
|||
|
|
@ -204,8 +204,9 @@ gimp_main (GType plug_in_type,
|
|||
/* Make plugins output available on console */
|
||||
if (AttachConsole (ATTACH_PARENT_PROCESS) != 0 && ! g_getenv ("TERM") && ! g_getenv ("SHELL"))
|
||||
{
|
||||
freopen ("CONOUT$", "w", stdout);
|
||||
freopen ("CONOUT$", "w", stderr);
|
||||
/* 'r' is needed to prevent interleaving and '+' to support colors */
|
||||
freopen ("CONOUT$", "r+", stdout);
|
||||
freopen ("CONOUT$", "r+", stderr);
|
||||
_flushall ();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue