]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
set /sim/fg-current to current working directory; getcwd() is defined in
[flightgear.git] / src / Main / main.cxx
index 70a4e5966f4b6e90a322fc243f0bb6f442c8ba41..ffb8d499bfb9a631e06135eb01c0b861b58d2635 100644 (file)
@@ -66,8 +66,6 @@
 #include <Sound/beacon.hxx>
 #include <Sound/morse.hxx>
 #include <FDM/flight.hxx>
-// #include <FDM/ADA.hxx>
-#include <ATC/ATCdisplay.hxx>
 #include <ATC/ATCmgr.hxx>
 #include <ATC/AIMgr.hxx>
 #include <Time/tmp.hxx>
@@ -514,8 +512,7 @@ static void fgMainLoop( void ) {
     double visibility_meters = fgGetDouble("/environment/visibility-m");
     FGViewer *current_view = globals->get_current_view();
 
-    globals->get_tile_mgr()->prep_ssg_nodes( current_view->getSGLocation(),
-                                             visibility_meters );
+    globals->get_tile_mgr()->prep_ssg_nodes( visibility_meters );
     // update tile manager for view...
     SGLocation *view_location = globals->get_current_view()->getSGLocation();
     globals->get_tile_mgr()->update( view_location, visibility_meters );
@@ -606,6 +603,9 @@ static void fgMainLoop( void ) {
 // then on.
 
 static void fgIdleFunction ( void ) {
+    // Some intialization requires a valid graphics context, in
+    // particular that of plib. Boo, hiss!
+    fgMakeCurrent();
     if ( idle_state == 0 ) {
         idle_state++;
 
@@ -935,7 +935,7 @@ bool fgMainInit( int argc, char **argv ) {
     fgInitFGRoot(argc, argv);
 
     // Check for the correct base package version
-    static char required_version[] = "0.9.10";
+    static char required_version[] = "0.9.11";
     string base_version = fgBasePackageVersion();
     if ( !(base_version == required_version) ) {
         // tell the operator how to use this application