]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/viewmgr.cxx
- implement progress information (enabled by default; can be turned off via
[flightgear.git] / src / Main / viewmgr.cxx
index ad376d30ad31e337ebcbaff46079f86fb32f9a4c..33fe8f7cb529dfff32d2cca298ff2d587e5a96d3 100644 (file)
 #include <string.h>            // strcmp
 
 #include <plib/sg.h>
+#include <plib/ssg.h>
+
+#include <simgear/compiler.h>
+
+#include <Model/acmodel.hxx>
 
 #include "viewmgr.hxx"
 #include "fg_props.hxx"
@@ -54,12 +59,14 @@ FGViewMgr::init ()
   // double damp_alt;
   double damp_roll = 0.0, damp_pitch = 0.0, damp_heading = 0.0;
   double x_offset_m, y_offset_m, z_offset_m, fov_deg;
-  double aspect_ratio_multiplier = 1.0;
   double heading_offset_deg, pitch_offset_deg, roll_offset_deg;
   double target_x_offset_m, target_y_offset_m, target_z_offset_m;
   double near_m;
   bool internal;
 
+  double aspect_ratio_multiplier
+      = fgGetDouble("/sim/current-view/aspect-ratio-multiplier");
+
   for (int i = 0; i < fgGetInt("/sim/number-views"); i++) {
     viewpath = "/sim/view";
     sprintf(stridx, "[%d]", i);
@@ -722,6 +729,12 @@ FGViewMgr::setView (int newview )
   set_view( newview );
   // copy in view data
   copyToCurrent ();
+
+  // Copy the fdm's position into the SGLocation which is shared with
+  // some views ...
+  globals->get_aircraft_model()->update(0);
+  // Do the update ...
+  update(0);
 }