]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_init.cxx
NavDisplay: fix update lag when switching range or centre.
[flightgear.git] / src / Main / fg_init.cxx
index 8d01e88e66fd7588044e0be827eead47eaf0deb8..47ecbd4497de117ed2f817122316a1db00ddad62 100644 (file)
@@ -502,7 +502,7 @@ static SGPath platformDefaultDataPath()
   
   SGPath appData;
   appData.set((const char*) path);
-  appData.append("flightgear.org");
+  appData.append("FlightGear");
   return appData;
 }
 #else
@@ -561,10 +561,10 @@ bool fgInitConfig ( int argc, char **argv )
             << "(from " << e.getOrigin() << ")");
       }
     }
-  
-  // Scan user config files and command line for a specified aircraft.
+
+    // Scan user config files and command line for a specified aircraft.
     flightgear::Options::sharedInstance()->initAircraft();
-      
+
     FindAndCacheAircraft f(&autosave);
     if (!f.loadAircraft()) {
       return false;
@@ -572,6 +572,10 @@ bool fgInitConfig ( int argc, char **argv )
 
     copyProperties(&autosave, globals->get_props());
 
+    // TODO Move some of the code above into loadUserSettings after the 2.6 release
+    // call dummy function, for now just to indicate that data was loaded
+    globals->loadUserSettings();
+
     // parse options after loading aircraft to ensure any user
     // overrides of defaults are honored.
     flightgear::Options::sharedInstance()->processOptions();
@@ -1181,6 +1185,15 @@ bool fgInitSubsystems() {
     SG_LOG( SG_GENERAL, SG_INFO, "Initialize Subsystems");
     SG_LOG( SG_GENERAL, SG_INFO, "========== ==========");
 
+    ////////////////////////////////////////////////////////////////////
+    // Initialize the sound subsystem.
+    ////////////////////////////////////////////////////////////////////
+    // Sound manager uses an own subsystem group "SOUND" which is the last
+    // to be updated in every loop.
+    // Sound manager is updated last so it can use the CPU while the GPU
+    // is processing the scenery (doubled the frame-rate for me) -EMH-
+    globals->add_subsystem("sound", new SGSoundMgr, SGSubsystemMgr::SOUND);
+
     ////////////////////////////////////////////////////////////////////
     // Initialize the event manager subsystem.
     ////////////////////////////////////////////////////////////////////