]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
Set "/sim/fghome-readonly" to false also for Windows.
[flightgear.git] / src / Main / main.cxx
index 26701f8a07575472645e7bcb9a65720a80b56695..7756a6d0cdeae0118688b3f40f38915957bf6f6d 100644 (file)
@@ -299,7 +299,9 @@ static void upper_case_property(const char *name)
         else
             assert(t == props::STRING);
     }
-    p->addChangeListener(new FGMakeUpperCase);
+    SGPropertyChangeListener* muc = new FGMakeUpperCase;
+    globals->addListenerToCleanup(muc);
+    p->addChangeListener(muc);
 }
 
 // see http://code.google.com/p/flightgear-bugs/issues/detail?id=385
@@ -388,6 +390,20 @@ int fgMainInit( int argc, char **argv ) {
         return EXIT_SUCCESS;
     }
     
+    configResult = fgInitAircraft(false);
+    if (configResult == flightgear::FG_OPTIONS_ERROR) {
+        return EXIT_FAILURE;
+    } else if (configResult == flightgear::FG_OPTIONS_EXIT) {
+        return EXIT_SUCCESS;
+    }
+    
+    configResult = flightgear::Options::sharedInstance()->processOptions();
+    if (configResult == flightgear::FG_OPTIONS_ERROR) {
+        return EXIT_FAILURE;
+    } else if (configResult == flightgear::FG_OPTIONS_EXIT) {
+        return EXIT_SUCCESS;
+    }
+    
     // Initialize the Window/Graphics environment.
     fgOSInit(&argc, argv);
     _bootstrap_OSInit++;