]> git.mxchange.org Git - flightgear.git/commitdiff
Detect and read a config file in FG_HOME - allows nicer tweaking of settings on Mac...
authorJames Turner <zakalawe@mac.com>
Sun, 16 Oct 2011 20:54:47 +0000 (21:54 +0100)
committerJames Turner <zakalawe@mac.com>
Sun, 16 Oct 2011 20:54:47 +0000 (21:54 +0100)
src/Main/fg_init.cxx

index a504c7cb8f8a409185a700f37425ab9784f8d497..6edb7a66dc5f8fa65a17dfa6b44711bcf1e6273a 100644 (file)
@@ -559,6 +559,13 @@ bool fgInitConfig ( int argc, char **argv ) {
       }
     }
     
+  // check for a config file in app data
+    SGPath appDataConfig(dataPath);
+    appDataConfig.append("fgfsrc");
+    if (appDataConfig.exists()) {
+      flightgear::Options::sharedInstance()->readConfig(appDataConfig);
+    }
+  
   // Scan user config files and command line for a specified aircraft.
     flightgear::Options::sharedInstance()->initAircraft();