From 0c74f7a2c8e0af7ac006c16fc9ef05e5f9245518 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Fri, 3 Nov 2017 01:51:33 +0200 Subject: win32: optimize the console and logging logic Currently one has to explicitly use --win32console and/or --win32log to enable a dedicated console (a console window that opens next to the Subsurface window) or to enable file logging on Win32. This patch makes the following changes: - removes the --win32* command line arguments - removes the dedicated console window support - if the app starts from a shortcut and not from a console, always redirect stderr and stdout to _err & _out log files - if the app starts from a console redirect stderr and stdout to that console Signed-off-by: Lubomir I. Ivanov --- subsurface-desktop-main.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'subsurface-desktop-main.cpp') diff --git a/subsurface-desktop-main.cpp b/subsurface-desktop-main.cpp index ff92236a9..ded3aee1f 100644 --- a/subsurface-desktop-main.cpp +++ b/subsurface-desktop-main.cpp @@ -41,15 +41,7 @@ int main(int argc, char **argv) QStringList importedFiles; QStringList arguments = QCoreApplication::arguments(); - bool win32_log = arguments.length() > 1 && - (arguments.at(1) == QString("--win32log")); - if (win32_log) { - subsurface_console_init(true, true); - } else { - bool dedicated_console = arguments.length() > 1 && - (arguments.at(1) == QString("--win32console")); - subsurface_console_init(dedicated_console, false); - } + subsurface_console_init(); const char *default_directory = system_default_directory(); const char *default_filename = system_default_filename(); -- cgit v1.2.3-70-g09d2