From 5438da42c0b35f156d1ba564d635c7a30a79eb75 Mon Sep 17 00:00:00 2001 From: zhongjin Date: Fri, 25 Nov 2022 08:24:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'src/Main/options.cxx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Main/options.cxx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/src/Main/options.cxx b/src/Main/options.cxx index 051858f..0d8fe72 100644 --- a/src/Main/options.cxx +++ b/src/Main/options.cxx @@ -272,19 +272,6 @@ void fgSetDefaults () if( envp != nullptr ) fgSetupProxy( envp ); - //zhongjin - //Addon - const auto& addonManager = addons::AddonManager::instance(); - - SGPath addonPath = globals->get_fg_root(); - addonPath.append("Addon/RedGriffinATC"); - - try { - addonManager->registerAddon(addonPath); - } catch (const sg_exception &e) { - string msg = "Error registering an add-on: " + e.getFormattedMessage(); - SG_LOG(SG_GENERAL, SG_ALERT, msg); - } } /////////////////////////////////////////////////////////////////////////////// @@ -2926,6 +2913,22 @@ OptionResult Options::processOptions() return FG_OPTIONS_EXIT; } + + //zhongjin Addon + const auto& addonManager = addons::AddonManager::instance(); + + SGPath addonPath = globals->get_fg_root(); + addonPath.append("Addon/RedGriffinATC"); + + try { + addonManager->registerAddon(addonPath); + } catch (const sg_exception &e) { + string msg = "Error registering an add-on: " + e.getFormattedMessage(); + SG_LOG(SG_GENERAL, SG_ALERT, msg); + } + //end + + return FG_OPTIONS_OK; } @@ -3063,7 +3066,7 @@ void Options::showUsage() const void Options::showVersion() const { - cout << "FlightGear version: " << FLIGHTGEAR_VERSION << endl; + cout << "FGFS version: " << FLIGHTGEAR_VERSION << endl; cout << "Revision: " << REVISION << endl; cout << "Build-Id: " << JENKINS_BUILD_ID << endl; cout << "Build-Type: " << FG_BUILD_TYPE << endl;