Skip to content

Commit

Permalink
Do not buffer stdout when rawtherapee.exe is called from msys2 console,
Browse files Browse the repository at this point in the history
fixes #4535
  • Loading branch information
heckflosse committed May 4, 2018
1 parent a84ce62 commit eab7483
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rtgui/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ int main (int argc, char **argv)
Glib::init(); // called by Gtk::Main, but this may be important for thread handling, so we call it ourselves now
Gio::init ();

#ifdef WIN32
if (GetFileType (GetStdHandle (STD_OUTPUT_HANDLE)) == 0x0003) {
// started from msys2 console => do not buffer stdout
setbuf(stdout, NULL);
}
#endif

#ifdef BUILD_BUNDLE
char exname[512] = {0};
Expand Down

0 comments on commit eab7483

Please sign in to comment.