]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/options.cxx
Fix line endings
[flightgear.git] / src / Main / options.cxx
index 11b5e7c0bd8f1cbe77eecc1c8b7f1b19fc31df0a..e5851a2fc17dae94916ca1883aed1a65496cc1d5 100644 (file)
@@ -47,7 +47,6 @@
 // #include <Airports/simple.hxx>
 // #include <Cockpit/cockpit.hxx>
 // #include <FDM/flight.hxx>
-// #include <FDM/UIUCModel/uiuc_aircraftdir.h>
 
 #include <Autopilot/route_mgr.hxx>
 #include <GUI/gui.h>
@@ -172,10 +171,16 @@ fgSetDefaults ()
     // fgSetString("/sim/startup/mouse-pointer", "disabled");
     fgSetString("/sim/control-mode", "joystick");
     fgSetBool("/sim/auto-coordination", false);
-#if !defined(WIN32)
-    fgSetString("/sim/startup/browser-app", "netscape");
-#else
+#if defined(WIN32)
     fgSetString("/sim/startup/browser-app", "webrun.bat");
+#elif defined(__APPLE__)
+    fgSetString("/sim/startup/browser-app", "open");
+#elif defined(sgi)
+    fgSetString("/sim/startup/browser-app", "launchWebJumper");
+#else
+    envp = ::getenv( "WEBBROWSER" );
+    if (!envp) envp = "netscape";
+    fgSetString("/sim/startup/browser-app", envp);
 #endif
     fgSetString("/sim/logging/priority", "alert");
 
@@ -225,14 +230,11 @@ fgSetDefaults ()
     fgSetBool("/sim/freeze/clock", false);
     fgSetBool("/sim/freeze/fuel", false);
 
-#ifdef FG_MPLAYER_AS
     fgSetString("/sim/multiplay/callsign", "callsign");
     fgSetString("/sim/multiplay/rxhost", "0");
     fgSetString("/sim/multiplay/txhost", "0");
     fgSetInt("/sim/multiplay/rxport", 0);
     fgSetInt("/sim/multiplay/txport", 0);
-#endif
-
 }
 
 static bool
@@ -1058,7 +1060,7 @@ fgOptConfig( const char *arg )
        readProperties(file, globals->get_props());
     } catch (const sg_exception &e) {
        string message = "Error loading config file: ";
-       message += e.getFormattedMessage();
+       message += e.getFormattedMessage() + e.getOrigin();
        SG_LOG(SG_INPUT, SG_ALERT, message);
        exit(2);
     }
@@ -1152,6 +1154,15 @@ fgOptDME( const char *arg )
     return FG_OPTIONS_OK;
 }
 
+static int
+fgOptLivery( const char *arg )
+{
+    string opt = arg;
+    string livery_path = "livery/" + opt;
+    fgSetString("/sim/model/texture-path", livery_path.c_str() );
+    return FG_OPTIONS_OK;
+}
+
 static map<string,size_t> fgOptionMap;
 
 /*
@@ -1283,6 +1294,8 @@ struct OptionDesc {
     {"aspect-ratio-multiplier",      true,  OPTION_DOUBLE, "/sim/current-view/aspect-ratio-multiplier", false, "", 0 },
     {"disable-fullscreen",           false, OPTION_BOOL,   "/sim/startup/fullscreen", false, "", 0 },
     {"enable-fullscreen",            false, OPTION_BOOL,   "/sim/startup/fullscreen", true, "", 0 },
+    {"disable-save-on-exit",         false, OPTION_BOOL,   "/sim/startup/save-on-exit", false, "", 0 },
+    {"enable-save-on-exit",          false, OPTION_BOOL,   "/sim/startup/save-on-exit", true, "", 0 },
     {"shading-flat",                 false, OPTION_BOOL,   "/sim/rendering/shading", false, "", 0 },
     {"shading-smooth",               false, OPTION_BOOL,   "/sim/rendering/shading", true, "", 0 },
     {"disable-skyblend",             false, OPTION_BOOL,   "/sim/rendering/skyblend", false, "", 0 },
@@ -1296,6 +1309,7 @@ struct OptionDesc {
     {"units-feet",                   false, OPTION_STRING, "/sim/startup/units", false, "feet", 0 },
     {"units-meters",                 false, OPTION_STRING, "/sim/startup/units", false, "meters", 0 },
     {"timeofday",                    true,  OPTION_STRING, "/sim/startup/time-offset-type", false, "noon", 0 },
+    {"season",                       true,  OPTION_STRING, "/sim/startup/season", false, "summer", 0 },
     {"time-offset",                  true,  OPTION_FUNC,   "", false, "", fgOptTimeOffset },
     {"time-match-real",              false, OPTION_STRING, "/sim/startup/time-offset-type", false, "system-offset", 0 },
     {"time-match-local",             false, OPTION_STRING, "/sim/startup/time-offset-type", false, "latitude-offset", 0 },
@@ -1326,10 +1340,8 @@ struct OptionDesc {
     {"joyclient",                    true,  OPTION_CHANNEL, "", false, "", 0 },
     {"jsclient",                     true,  OPTION_CHANNEL, "", false, "", 0 },
     {"proxy",                        true,  OPTION_FUNC,    "", false, "", fgSetupProxy },
-#ifdef FG_MPLAYER_AS
     {"callsign",                     true, OPTION_STRING,  "sim/multiplay/callsign", false, "", 0 },
     {"multiplay",                    true,  OPTION_CHANNEL, "", false, "", 0 },
-#endif
     {"trace-read",                   true,  OPTION_FUNC,   "", false, "", fgOptTraceRead },
     {"trace-write",                  true,  OPTION_FUNC,   "", false, "", fgOptTraceWrite },
     {"log-level",                    true,  OPTION_FUNC,   "", false, "", fgOptLogLevel },
@@ -1352,6 +1364,7 @@ struct OptionDesc {
     {"adf",                          true,  OPTION_FUNC,   "", false, "", fgOptADF },
     {"dme",                          true,  OPTION_FUNC,   "", false, "", fgOptDME },
     {"min-status",                   true,  OPTION_STRING,  "/sim/aircraft-min-status", false, "all", 0 },
+    {"livery",                       true,  OPTION_FUNC,   "", false, "", fgOptLivery },
     {0}
 };