Do not buffer stdout when rawtherapee.exe is called from msys2 console, fixes #4535

This commit is contained in:
heckflosse
2018-05-04 20:01:49 +02:00
parent a84ce6240a
commit eab7483431

View File

@@ -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};