// fg_commands.cxx - internal FGFS commands.
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <string.h> // strcmp()
#include <simgear/compiler.h>
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));
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;
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;
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;
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;
}