Commit 5c3ff7c9 authored by Edric Milaret's avatar Edric Milaret Committed by Alexandre Lision

debug: add an option to show debug console

- works with -d or --debug

Refs #76093

Change-Id: Icac9ad4a140510bba13c003beda3e3194136d44e
parent c7ab550e
......@@ -33,11 +33,35 @@
REGISTER_MEDIA();
void
Console()
{
AllocConsole();
freopen("CONOUT$", "w", stdout);
freopen("CONOUT$", "w", stderr);
COORD coordInfo;
coordInfo.X = 130;
coordInfo.Y = 9000;
SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coordInfo);
SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE),ENABLE_QUICK_EDIT_MODE| ENABLE_EXTENDED_FLAGS);
}
int
main(int argc, char *argv[])
{
QApplication a(argc, argv);
auto startMinimized = false;
for (auto string : QCoreApplication::arguments()) {
if (string == "-m" || string == "--minimized")
startMinimized = true;
if (string == "-d" || string == "--debug")
Console();
}
QFont font;
font.setFamily("Segoe UI");
a.setFont(font);
......@@ -51,13 +75,6 @@ main(int argc, char *argv[])
MainWindow w;
auto startMinimized = false;
for (auto string : QCoreApplication::arguments()) {
if (string == "-m" || string == "--minimized")
startMinimized = true;
}
if (not startMinimized)
w.show();
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment