Reopen console on windows when started from cmd.exe
This commit is contained in:
@@ -6,6 +6,9 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "../thumbnailer/genthumbnail.h"
|
#include "../thumbnailer/genthumbnail.h"
|
||||||
|
#ifdef Q_OS_WIN64
|
||||||
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@@ -19,6 +22,14 @@ int main(int argc, char *argv[])
|
|||||||
bool useGLES = true;
|
bool useGLES = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN64
|
||||||
|
if(AttachConsole(ATTACH_PARENT_PROCESS))
|
||||||
|
{
|
||||||
|
freopen("CONOUT$", "w", stdout);
|
||||||
|
freopen("CONOUT$", "w", stderr);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QCommandLineParser cmd;
|
QCommandLineParser cmd;
|
||||||
cmd.addOption({"gl", "Use desktop OpenGL. This is default on x86 and MacOS platform."});
|
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."});
|
cmd.addOption({"gles", "Use OpenGL ES. This is default on ARM platform."});
|
||||||
|
|||||||
Reference in New Issue
Block a user