From 314844e3c863ae90b88ff864d7a004442e25aa77 Mon Sep 17 00:00:00 2001 From: James Turner Date: Mon, 27 Feb 2017 00:06:41 +0000 Subject: [PATCH] =?UTF-8?q?Make=20=E2=80=94console=20work=20in=20the=20lau?= =?UTF-8?q?ncher.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As discussed on the ML, due to how this options is processed, the launcher setting it doesn’t make it take effect, so deal with it manually. --- src/GUI/QtLauncher.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/GUI/QtLauncher.cxx b/src/GUI/QtLauncher.cxx index 77abd10e2..7d9404e7a 100644 --- a/src/GUI/QtLauncher.cxx +++ b/src/GUI/QtLauncher.cxx @@ -1221,6 +1221,11 @@ void QtLauncher::onRun() if (a.arg.startsWith("prop:")) { QString v = a.arg.mid(5) + "=" + a.value; opt->addOption("prop", v.toStdString()); + } else if (a.arg == "--console") { + // this option is handled very early, in normal startup. If the user + // requests it via the launcher, parseOptions never sees it, so + // achieve the same result manually. + simgear::requestConsole(); } else { opt->addOption(a.arg.toStdString(), a.value.toStdString()); }