]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
Make FGControls behave like a standard subsystem.
[flightgear.git] / src / Main / main.cxx
index 4dc123c27951416415c6f818b47e3c19419dbb37..792a20cb98416de085feff55417d10aeda18e043 100644 (file)
@@ -49,7 +49,6 @@
 #include <simgear/math/SGMath.hxx>
 #include <simgear/math/sg_random.h>
 
-#include <Aircraft/controls.hxx>
 #include <Model/panelnode.hxx>
 #include <Scenery/scenery.hxx>
 #include <Scenery/tilemgr.hxx>
@@ -80,31 +79,6 @@ using std::vector;
 // is initialized.
 extern int _bootstrap_OSInit;
 
-
-static void fgLoadInitialScenery()
-{
-    static SGPropertyNode_ptr scenery_loaded
-        = fgGetNode("sim/sceneryloaded", true);
-    static SGPropertyNode_ptr scenery_override
-        = fgGetNode("/sim/sceneryloaded-override", true);
-
-    if (!scenery_loaded->getBoolValue())
-    {
-        if (scenery_override->getBoolValue() ||
-            (globals->get_tile_mgr()->isSceneryLoaded()
-             && fgGetBool("sim/fdm-initialized"))) {
-            fgSetBool("sim/sceneryloaded",true);
-            fgSplashProgress("");
-        }
-        else
-        {
-            fgSplashProgress("loading-scenery");
-            // be nice to loader threads while waiting for initial scenery, reduce to 20fps
-            SGTimeStamp::sleepForMSec(50);
-        }
-    }
-}
-
 // What should we do when we have nothing else to do?  Let's get ready
 // for the next move and update the display?
 static void fgMainLoop( void )
@@ -126,9 +100,6 @@ static void fgMainLoop( void )
     // update all subsystems
     globals->get_subsystem_mgr()->update(sim_dt);
 
-    // END Tile Manager updates
-    fgLoadInitialScenery();
-
     simgear::AtomicChangeListener::fireChangeListeners();
 
     SG_LOG( SG_GENERAL, SG_DEBUG, "" );
@@ -392,9 +363,6 @@ int fgMainInit( int argc, char **argv ) {
     // seed the random number generator
     sg_srandom_time();
 
-    FGControls *controls = new FGControls;
-    globals->set_controls( controls );
-
     string_list *col = new string_list;
     globals->set_channel_options_list( col );