From a84ce6240a9a236b49e806a94100fd91a0281ae3 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Tue, 1 May 2018 15:46:10 +0200 Subject: [PATCH 1/2] Disable verbose when calling rawtherapee -v/h --- rtgui/main.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/rtgui/main.cc b/rtgui/main.cc index 40919b69a..8ba7fb213 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -514,15 +514,6 @@ int main (int argc, char **argv) options.rtSettings.lensfunDbDirectory = LENSFUN_DB_PATH; #endif - Glib::ustring fatalError; - - try { - Options::load(); - } catch (Options::Error &e) { - fatalError = e.get_msg(); - } - - #ifdef WIN32 bool consoleOpened = false; @@ -600,6 +591,14 @@ int main (int argc, char **argv) #endif + Glib::ustring fatalError; + + try { + Options::load(); + } catch (Options::Error &e) { + fatalError = e.get_msg(); + } + if (gimpPlugin) { if (!Glib::file_test (argv1, Glib::FILE_TEST_EXISTS) || Glib::file_test (argv1, Glib::FILE_TEST_IS_DIR)) { printf ("Error: argv1 doesn't exist\n"); From eab748343199252692622e1a4f3f3b3e356cc182 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Fri, 4 May 2018 20:01:49 +0200 Subject: [PATCH 2/2] Do not buffer stdout when rawtherapee.exe is called from msys2 console, fixes #4535 --- rtgui/main.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rtgui/main.cc b/rtgui/main.cc index 8ba7fb213..327b0ab33 100644 --- a/rtgui/main.cc +++ b/rtgui/main.cc @@ -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};