1
0
Fork 0

Win32: reworked console opening

This is mainly for standalone FGCOM - because the error message is always shown because it is a console app and --console isn't required.
This commit is contained in:
Richard Harrison 2021-03-29 17:53:30 +02:00
parent 58d8b7faa0
commit 3274925cf3
2 changed files with 4 additions and 4 deletions

View file

@ -280,7 +280,7 @@ public:
p != path_list.end(); ++p)
visitDir(*p, 0);
simgear::requestConsole(); // ensure console is shown on Windows
simgear::requestConsole(false); // ensure console is shown on Windows
std::sort(_aircraft.begin(), _aircraft.end(),
[](const std::string& lhs, const std::string& rhs) {
@ -1229,7 +1229,7 @@ fgOptConsole(const char *arg)
if (!already_done)
{
already_done = true;
simgear::requestConsole();
simgear::requestConsole(false);
}
return FG_OPTIONS_OK;
}
@ -2862,7 +2862,7 @@ void Options::showUsage() const
FGLocale *locale = globals->get_locale();
SGPropertyNode options_root;
simgear::requestConsole(); // ensure console is shown on Windows
simgear::requestConsole(false); // ensure console is shown on Windows
cout << endl;
try {

View file

@ -82,7 +82,7 @@ int main(int argc, char** argv)
signal(SIGINT, quit);
signal(SIGTERM, quit);
simgear::requestConsole();
simgear::requestConsole(true);
sglog().setLogLevels(SG_ALL, SG_INFO);
_app += FGCOM_VERSION;
Modes mode = PILOT;