merge with dev

This commit is contained in:
Desmis
2018-05-05 11:32:47 +02:00

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};
@@ -514,15 +520,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 +597,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");