]> git.mxchange.org Git - flightgear.git/commitdiff
Reload user preferences after reading the video configuration file
authorErik Hofman <erik@ehofman.com>
Mon, 21 Mar 2016 10:50:11 +0000 (11:50 +0100)
committerErik Hofman <erik@ehofman.com>
Mon, 21 Mar 2016 10:50:11 +0000 (11:50 +0100)
src/Main/main.cxx

index d170155896050056e4d745f0954f0ddf44685a90..0e683a69af66c6602a9ef379b4a630210bee4116 100644 (file)
@@ -159,7 +159,10 @@ static void fgSetVideoOptions()
     if (path.exists())
     {
         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) {
             pos = renderer.find(" (");
         }
@@ -176,6 +179,13 @@ 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"))
+            {
+                SGPath dataPath = globals->get_fg_home();
+                globals->loadUserSettings(dataPath);
+            }
         }
     }
 }