]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/util.cxx
Modified Files:
[flightgear.git] / src / Main / util.cxx
index ca3231206db146073d6ebc257c9bfeafaf3ae714..c6efd7b0a5e33b1bca426f198c81ffb4ff8dde69 100644 (file)
@@ -13,7 +13,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -32,6 +32,9 @@ SG_USING_STD(vector);
 #include "globals.hxx"
 #include "util.hxx"
 
+#ifdef OSG_LIBRARY_STATIC
+#include "osgDB/Registry"
+#endif
 
 void
 fgDefaultWeatherValue (const char * propname, double value)
@@ -104,9 +107,11 @@ fgSetupWind (double min_hdg, double max_hdg, double speed, double gust)
 void
 fgExit (int status)
 {
-    SG_LOG(SG_GENERAL, SG_INFO, "Exiting FlightGear with status " << status);
+#ifdef OSG_LIBRARY_STATIC
+    osgDB::Registry::instance( true);
+#endif
 
-    globals->get_io()->shutdown_all();
+    SG_LOG(SG_GENERAL, SG_INFO, "Exiting FlightGear with status " << status);
     exit(status);
 }
 
@@ -116,7 +121,7 @@ double
 fgGetLowPass (double current, double target, double timeratio)
 {
     if ( timeratio < 0.0 ) {
-       if ( timeratio < -1.0 ) {
+        if ( timeratio < -1.0 ) {
                                 // time went backwards; kill the filter
                 current = target;
         } else {