Reload user preferences after reading the video configuration file
This commit is contained in:
parent
0cfa4ced9c
commit
209194ecba
1 changed files with 11 additions and 1 deletions
|
@ -159,7 +159,10 @@ static void fgSetVideoOptions()
|
||||||
if (path.exists())
|
if (path.exists())
|
||||||
{
|
{
|
||||||
std::string renderer = fgGetString("/sim/rendering/gl-renderer");
|
std::string renderer = fgGetString("/sim/rendering/gl-renderer");
|
||||||
size_t pos = renderer.find('/');
|
size_t pos = renderer.find("x86/");
|
||||||
|
if (pos == std::string::npos) {
|
||||||
|
pos = renderer.find('/');
|
||||||
|
}
|
||||||
if (pos == std::string::npos) {
|
if (pos == std::string::npos) {
|
||||||
pos = renderer.find(" (");
|
pos = renderer.find(" (");
|
||||||
}
|
}
|
||||||
|
@ -176,6 +179,13 @@ static void fgSetVideoOptions()
|
||||||
SG_LOG(SG_INPUT, SG_WARN, "failed to read video settings:" << e.getMessage()
|
SG_LOG(SG_INPUT, SG_WARN, "failed to read video settings:" << e.getMessage()
|
||||||
<< "(from " << e.getOrigin() << ")");
|
<< "(from " << e.getOrigin() << ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flightgear::Options* options = flightgear::Options::sharedInstance();
|
||||||
|
if (!options->isOptionSet("ignore-autosave"))
|
||||||
|
{
|
||||||
|
SGPath dataPath = globals->get_fg_home();
|
||||||
|
globals->loadUserSettings(dataPath);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue