1
0
Fork 0

Make —console work in the launcher.

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.
This commit is contained in:
James Turner 2017-02-27 00:06:41 +00:00
parent e74ebabc36
commit 314844e3c8

View file

@ -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());
}