]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_props.cxx
Make sure 'make dist' keeps working.
[flightgear.git] / src / Main / fg_props.cxx
index a56cfc59cd17c6a03eb1e667cbc1c82afa9474e7..6d0cb799afcd040d0dc84b0ed0325abff211e78e 100644 (file)
 #endif
 
 #include <simgear/compiler.h>
-
 #include <simgear/structure/exception.hxx>
+#include <simgear/props/props_io.hxx>
+
 #include <simgear/magvar/magvar.hxx>
 #include <simgear/timing/sg_time.hxx>
 #include <simgear/misc/sg_path.hxx>
-#include <simgear/scene/material/matlib.hxx>
 #include <simgear/sound/soundmgr_openal.hxx>
 
-#include STL_IOSTREAM
-
 #include <Aircraft/aircraft.hxx>
-#include <Time/tmp.hxx>
-#include <Environment/environment.hxx>
-
+#include <FDM/flight.hxx>
 #include <GUI/gui.h>
 
 #include "globals.hxx"
 #include "fg_props.hxx"
 
-SG_USING_STD(istream);
-SG_USING_STD(ostream);
 
 static bool winding_ccw = true; // FIXME: temporary
 
@@ -53,7 +47,7 @@ static bool fdm_data_logging = false; // FIXME: temporary
 
 static bool frozen = false;    // FIXME: temporary
 
-
+using std::string;
 \f
 ////////////////////////////////////////////////////////////////////////
 // Default property bindings (not yet handled by any module).
@@ -232,7 +226,7 @@ setFreeze (bool f)
     if ( s != NULL ) {
         if ( f ) {
             s->pause();
-        } else {
+        } else if (!fgGetBool("/sim/sound/pause")) {
             s->resume();
         }
     }
@@ -395,27 +389,6 @@ setWindingCCW (bool state)
     glFrontFace ( GL_CW );
 }
 
-static bool
-getFullScreen ()
-{
-#if defined(FX) && !defined(WIN32)
-  return globals->get_fullscreen();
-#else
-  return false;
-#endif
-}
-
-static void
-setFullScreen (bool state)
-{
-#if defined(FX) && !defined(WIN32)
-  globals->set_fullscreen(state);
-#  if defined(XMESA_FX_FULLSCREEN) && defined(XMESA_FX_WINDOW)
-  XMesaSetFXmode( state ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW );
-#  endif
-#endif
-}
-
 static bool
 getFDMDataLogging ()
 {
@@ -463,6 +436,7 @@ getLongitudeString ()
     snprintf(buf, 32, "%d*%02d %04.1f%c", int(d < 0.0 ? -deg : deg),
         int(min), fabs(sec), c);
   }
+  buf[31] = '\0';
   return buf;
 }
 
@@ -491,6 +465,7 @@ getLatitudeString ()
     snprintf(buf, 32, "%d*%02d %04.1f%c", int(d < 0.0 ? -deg : deg),
         int(min), fabs(sec), c);
   }
+  buf[31] = '\0';
   return buf;
 }
 
@@ -542,7 +517,6 @@ FGProperties::bind ()
 
                                // Misc. Temporary junk.
   fgTie("/sim/temp/winding-ccw", getWindingCCW, setWindingCCW, false);
-  fgTie("/sim/temp/full-screen", getFullScreen, setFullScreen);
   fgTie("/sim/temp/fdm-data-logging", getFDMDataLogging, setFDMDataLogging);
 }
 
@@ -610,7 +584,7 @@ FGProperties::update (double dt)
  * Save the current state of the simulator to a stream.
  */
 bool
-fgSaveFlight (ostream &output, bool write_all)
+fgSaveFlight (std::ostream &output, bool write_all)
 {
 
   fgSetBool("/sim/presets/onground", false);
@@ -634,7 +608,7 @@ fgSaveFlight (ostream &output, bool write_all)
  * Restore the current state of the simulator from a stream.
  */
 bool
-fgLoadFlight (istream &input)
+fgLoadFlight (std::istream &input)
 {
   SGPropertyNode props;
   try {