]> git.mxchange.org Git - flightgear.git/commitdiff
Reset: make fgSetDefaults non-static.
authorJames Turner <zakalawe@mac.com>
Sat, 16 Nov 2013 12:00:00 +0000 (12:00 +0000)
committerJames Turner <zakalawe@mac.com>
Sat, 16 Nov 2013 13:02:43 +0000 (13:02 +0000)
src/Main/fg_init.cxx
src/Main/options.cxx
src/Main/options.hxx

index 8905a6a1deef0cbcaaaebbacf9c01c66498fb193..d1d4d15ca8237368e373b5e37941ea20f2c529be 100644 (file)
@@ -490,6 +490,7 @@ int fgInitConfig ( int argc, char **argv )
     home->setStringValue(dataPath.c_str());
     home->setAttribute(SGPropertyNode::WRITE, false);
   
+    fgSetDefaults();
     flightgear::Options* options = flightgear::Options::sharedInstance();
     options->init(argc, argv, dataPath);
     bool loadDefaults = flightgear::Options::sharedInstance()->shouldLoadDefaultConfig();
index eecb6e6681181e2d78b9ea61c356965f302409f1..6a5b8bbbead1f2fa49335547e5d8268a2dc64d07 100644 (file)
@@ -114,8 +114,7 @@ static int fgSetupProxy( const char *arg );
  * in case, we provide some initial sane values here. This method
  * should be invoked *before* reading any init files.
  */
-static void
-fgSetDefaults ()
+void fgSetDefaults ()
 {
 
                                // Position (deliberately out of range)
@@ -1704,8 +1703,6 @@ Options::~Options()
   
 void Options::init(int argc, char **argv, const SGPath& appDataPath)
 {
-  fgSetDefaults();
-  
 // first, process the command line
   bool inOptions = true;
   for (int i=1; i<argc; ++i) {
index 7765ecffee7a7f5f2e98156abfbf0d53e21e87bd..d0715cda2e9efa33c52f3016e2e3fd22e20b7cee 100644 (file)
@@ -130,4 +130,6 @@ private:
   
 } // of namespace flightgear
 
+void fgSetDefaults();
+
 #endif /* _OPTIONS_HXX */