diff --git a/src/main.cpp b/src/main.cpp index af42213..28bf7bd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,9 @@ #include #include #include "../thumbnailer/genthumbnail.h" +#ifdef Q_OS_WIN64 +#include +#endif int main(int argc, char *argv[]) { @@ -19,6 +22,14 @@ int main(int argc, char *argv[]) bool useGLES = true; #endif +#ifdef Q_OS_WIN64 + if(AttachConsole(ATTACH_PARENT_PROCESS)) + { + freopen("CONOUT$", "w", stdout); + freopen("CONOUT$", "w", stderr); + } +#endif + QCommandLineParser cmd; cmd.addOption({"gl", "Use desktop OpenGL. This is default on x86 and MacOS platform."}); cmd.addOption({"gles", "Use OpenGL ES. This is default on ARM platform."});