summaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index c93121400..a011b4caf 100644
--- a/main.cpp
+++ b/main.cpp
@@ -23,6 +23,11 @@ int main(int argc, char **argv)
QStringList files;
QStringList importedFiles;
QStringList arguments = QCoreApplication::arguments();
+
+ bool dedicated_console = arguments.length() > 1 &&
+ (arguments.at(1) == QString("--win32console"));
+ subsurface_console_init(dedicated_console);
+
for (i = 1; i < arguments.length(); i++) {
QString a = arguments.at(i);
if (a.at(0) == '-') {
@@ -56,5 +61,6 @@ int main(int argc, char **argv)
run_ui();
exit_ui();
parse_xml_exit();
+ subsurface_console_exit();
return 0;
}