Option to restore defaults and enable/disable random buildings+vegetation
fgfs can fail to start when random buildings is set to an excessive level, so you can't even reach the GUI setting to reduce/disable again.
This commit is contained in:
parent
df4ccc3b88
commit
831662fca8
2 changed files with 14 additions and 1 deletions
|
@ -426,7 +426,15 @@ bool fgInitConfig ( int argc, char **argv )
|
|||
fgLoadProps("preferences.xml", globals->get_props());
|
||||
SG_LOG(SG_INPUT, SG_INFO, "Finished Reading global preferences");
|
||||
|
||||
globals->loadUserSettings(dataPath);
|
||||
// do not load user settings when reset to default is requested
|
||||
if (flightgear::Options::sharedInstance()->isOptionSet("restore-defaults"))
|
||||
{
|
||||
SG_LOG(SG_ALL, SG_ALERT, "Ignoring user settings. Restoring defaults.");
|
||||
}
|
||||
else
|
||||
{
|
||||
globals->loadUserSettings(dataPath);
|
||||
}
|
||||
|
||||
// Scan user config files and command line for a specified aircraft.
|
||||
flightgear::Options::sharedInstance()->initAircraft();
|
||||
|
|
|
@ -1335,6 +1335,10 @@ struct OptionDesc {
|
|||
{"enable-mouse-pointer", false, OPTION_STRING, "/sim/startup/mouse-pointer", false, "enabled", 0 },
|
||||
{"disable-random-objects", false, OPTION_BOOL, "/sim/rendering/random-objects", false, "", 0 },
|
||||
{"enable-random-objects", false, OPTION_BOOL, "/sim/rendering/random-objects", true, "", 0 },
|
||||
{"disable-random-vegetation", false, OPTION_BOOL, "/sim/rendering/random-vegetation", false, "", 0 },
|
||||
{"enable-random-vegetation", false, OPTION_BOOL, "/sim/rendering/random-vegetation", true, "", 0 },
|
||||
{"disable-random-buildings", false, OPTION_BOOL, "/sim/rendering/random-buildings", false, "", 0 },
|
||||
{"enable-random-buildings", false, OPTION_BOOL, "/sim/rendering/random-buildings", true, "", 0 },
|
||||
{"disable-real-weather-fetch", false, OPTION_BOOL, "/environment/realwx/enabled", false, "", 0 },
|
||||
{"enable-real-weather-fetch", false, OPTION_BOOL, "/environment/realwx/enabled", true, "", 0 },
|
||||
{"metar", true, OPTION_STRING, "/environment/metar/data", false, "", 0 },
|
||||
|
@ -1424,6 +1428,7 @@ struct OptionDesc {
|
|||
{"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 },
|
||||
{"restore-defaults", false, OPTION_BOOL, "/sim/startup/restore-defaults", 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 },
|
||||
|
|
Loading…
Add table
Reference in a new issue