]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
Fix line endings
[flightgear.git] / src / Main / fg_commands.cxx
index 23bf24222647224d619ece1e8a562d389c32ee18..2a1863411e1f439c9d749e3cc585ace428901ee7 100644 (file)
@@ -1,5 +1,9 @@
 // fg_commands.cxx - internal FGFS commands.
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
 #include <string.h>            // strcmp()
 
 #include <simgear/compiler.h>
@@ -205,16 +209,16 @@ do_exit (const SGPropertyNode * arg)
             SGPath config( homedir );
             config.append( ".fgfs" );
 #endif
-            config.append( "preferences.xml" );
+            config.append( "autosave.xml" );
             config.create_dir( 0700 );
-            SG_LOG(SG_IO, SG_INFO, "Saving user preferences");
+            SG_LOG(SG_IO, SG_INFO, "Saving user settings to autosave.xml");
             try {
                 writeProperties(config.str(), globals->get_props(), false, SGPropertyNode::USERARCHIVE);
             } catch (const sg_exception &e) {
-                guiErrorMessage("Error saving preferences: ", e);
+                guiErrorMessage("Error writing autosave.xml: ", e);
             }
 
-            SG_LOG(SG_INPUT, SG_BULK, "Finished Saving user preferences");
+            SG_LOG(SG_INPUT, SG_BULK, "Finished Saving user settings");
         }
     }
     fgExit(arg->getIntValue("status", 0));
@@ -584,9 +588,9 @@ do_set_oat_degc (const SGPropertyNode * arg)
     dummy.set_temperature_degc( atof( temp_str.c_str() ) );
     double temp_sea_level_degc = dummy.get_temperature_sea_level_degc();
 
-    cout << "Altitude = " << altitude_ft->getDoubleValue() << endl;
-    cout << "Temp at alt (C) = " << atof( temp_str.c_str() ) << endl;
-    cout << "Temp sea level (C) = " << temp_sea_level_degc << endl;
+    //cout << "Altitude = " << altitude_ft->getDoubleValue() << endl;
+    //cout << "Temp at alt (C) = " << atof( temp_str.c_str() ) << endl;
+    //cout << "Temp sea level (C) = " << temp_sea_level_degc << endl;
  
     SGPropertyNode *node, *child;
 
@@ -674,9 +678,9 @@ do_set_dewpoint_degc (const SGPropertyNode * arg)
     dummy.set_dewpoint_degc( atof( dewpoint_str.c_str() ) );
     double dewpoint_sea_level_degc = dummy.get_dewpoint_sea_level_degc();
 
-    cout << "Altitude = " << altitude_ft->getDoubleValue() << endl;
-    cout << "Dewpoint at alt (C) = " << atof( dewpoint_str.c_str() ) << endl;
-    cout << "Dewpoint at sea level (C) = " << dewpoint_sea_level_degc << endl;
+    //cout << "Altitude = " << altitude_ft->getDoubleValue() << endl;
+    //cout << "Dewpoint at alt (C) = " << atof( dewpoint_str.c_str() ) << endl;
+    //cout << "Dewpoint at sea level (C) = " << dewpoint_sea_level_degc << endl;
  
     SGPropertyNode *node, *child;
 
@@ -1157,7 +1161,7 @@ do_play_audio_message (const SGPropertyNode * arg)
     FGFX *fx = (FGFX *)globals->get_subsystem("fx");
     string path = arg->getStringValue("path");
     string file = arg->getStringValue("file");
-    cout << "playing " << path << " / " << file << endl;
+    // cout << "playing " << path << " / " << file << endl;
     fx->play_message( path, file );
 
     return true;
@@ -1223,8 +1227,8 @@ do_replay (const SGPropertyNode * arg)
         fgSetDouble( "/sim/replay/time", r->get_start_time() );
     }
 
-    cout << "start = " << r->get_start_time()
-         << "  end = " << r->get_end_time() << endl;
+    // cout << "start = " << r->get_start_time()
+    //      << "  end = " << r->get_end_time() << endl;
 
     return true;
 }