]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
ITM radio calculations are only considered valid
[flightgear.git] / src / Main / fg_commands.cxx
index a07739d2ae74352e831ce59ee31ccb3eebdff6f6..2c8c4ed2065d7669e1bf22ca86e5d7a6755ac04c 100644 (file)
@@ -189,22 +189,7 @@ do_exit (const SGPropertyNode * arg)
 {
     SG_LOG(SG_INPUT, SG_INFO, "Program exit requested.");
     fgSetBool("/sim/signals/exit", true);
-
-    if (fgGetBool("/sim/startup/save-on-exit")) {
-      SGPath autosaveFile(fgGetString("/sim/fg-home"));
-      autosaveFile.append( "autosave.xml" );
-      autosaveFile.create_dir( 0700 );
-      SG_LOG(SG_IO, SG_INFO, "Saving user settings to " << autosaveFile.str());
-      try {
-        writeProperties(autosaveFile.str(), globals->get_props(), false, SGPropertyNode::USERARCHIVE);
-      } catch (const sg_exception &e) {
-        guiErrorMessage("Error writing autosave.xml: ", e);
-      }
-      
-      SG_LOG(SG_INPUT, SG_DEBUG, "Finished Saving user settings");
-
-    }
-    
+    globals->saveUserSettings();
     fgOSExit(arg->getIntValue("status", 0));
     return true;
 }