Only load the video settings when the autosave file is not found. This requires the properties in the video settings configuration file to have the archive attribute set but it solves the problem of loading the autosave file twice (and too late in the process)
This commit is contained in:
parent
ba08eee096
commit
2fd0877824
1 changed files with 4 additions and 5 deletions
|
@ -218,6 +218,10 @@ static void initTerrasync()
|
|||
|
||||
static void fgSetVideoOptions()
|
||||
{
|
||||
SGPath userDataPath = globals->get_fg_home();
|
||||
SGPath autosaveFile = globals->autosaveFilePath(userDataPath);
|
||||
if (autosaveFile.exists()) return;
|
||||
|
||||
std::string vendor = fgGetString("/sim/rendering/gl-vendor");
|
||||
SGPath path(globals->get_fg_root());
|
||||
path.append("Video");
|
||||
|
@ -245,11 +249,6 @@ static void fgSetVideoOptions()
|
|||
SG_LOG(SG_INPUT, SG_WARN, "failed to read video settings:" << e.getMessage()
|
||||
<< "(from " << e.getOrigin() << ")");
|
||||
}
|
||||
|
||||
flightgear::Options* options = flightgear::Options::sharedInstance();
|
||||
if (!options->isOptionSet("ignore-autosave")) {
|
||||
globals->loadUserSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue