]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/main.cxx
Tweak ODGauge usage, fix multiple instances of NavDisplay or wxRadar.
[flightgear.git] / src / Main / main.cxx
index d6036771af883222ab7729f731727da150c3e408..5535060d557180964e19f2df109d27441868cc9c 100644 (file)
@@ -259,19 +259,6 @@ struct GeneralInitOperation : public GraphicsContextOperation
     }
 };
 
-
-osg::Node* load_panel(SGPropertyNode *n)
-{
-    osg::Geode* geode = new osg::Geode;
-    geode->addDrawable(new FGPanelNode(n));
-    return geode;
-}
-
-SGPath resolve_path(const std::string& s)
-{
-  return globals->resolve_maybe_aircraft_path(s);
-}
-
 }
 
 // This is the top level master main function that is registered as
@@ -349,7 +336,7 @@ static void fgIdleFunction ( void ) {
         ////////////////////////////////////////////////////////////////////
         globals->set_matlib( new SGMaterialLib );
         simgear::SGModelLib::init(globals->get_fg_root(), globals->get_props());
-        simgear::SGModelLib::setPanelFunc(load_panel);
+        simgear::SGModelLib::setPanelFunc(FGPanelNode::load);
 
         ////////////////////////////////////////////////////////////////////
         // Initialize the TG scenery subsystem.
@@ -387,9 +374,6 @@ static void fgIdleFunction ( void ) {
                                    fgGetDouble("/position/altitude-ft")
                                    * SG_FEET_TO_METER,
                                    globals->get_time_params()->getJD() );
-        double var = globals->get_mag()->get_magvar() * SGD_RADIANS_TO_DEGREES;
-        fgSetDouble("/instrumentation/heading-indicator/offset-deg", -var);
-        fgSetDouble("/instrumentation/heading-indicator-fg/offset-deg", -var);
 
         fgSplashProgress("initializing subsystems");
 
@@ -414,7 +398,11 @@ static void fgIdleFunction ( void ) {
             string command = "mpg123 " + mp3file.str() + "> /dev/null 2>&1";
 # endif
 
-            system ( command.c_str() );
+            if (0 != system ( command.c_str() ))
+            {
+                SG_LOG( SG_SOUND, SG_WARN,
+                    "Failed to play mp3 file " << mp3file.str() << ". Maybe mp3 player is not installed." );
+            }
         }
 #endif
         // This is the top level init routine which calls all the