]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
Linux needs stdarg.h for va_args
[flightgear.git] / src / Main / main.cxx
index 26ac132abfff94463e61d5509c23e68e7aa1a1bf..3f82429bf1c7f39d6b6718215bf5a4dc934607a7 100644 (file)
@@ -143,7 +143,8 @@ static void fgIdleFunction ( void ) {
         
         fgSetString("/sim/terrasync/cache-path", tsyncCache.c_str());
         
-        simgear::SGTerraSync* terra_sync = new simgear::SGTerraSync(globals->get_props());
+        simgear::SGTerraSync* terra_sync = new simgear::SGTerraSync();
+        terra_sync->setRoot(globals->get_props());
         globals->add_subsystem("terrasync", terra_sync);
         
         
@@ -391,6 +392,8 @@ int fgMainInit( int argc, char **argv ) {
     
     // pass control off to the master event handler
     int result = fgOSMainLoop();
+    frame_signal.clear();
+    fgOSCloseWindow();
     
     // clean up here; ensure we null globals to avoid
     // confusing the atexit() handler