]> git.mxchange.org Git - flightgear.git/blobdiff - src/GUI/gui_local.cxx
- Added ultra-light traffic is now a separate traffic class that can have its
[flightgear.git] / src / GUI / gui_local.cxx
index e881cd2a7c40613e917434926154a83c404cd866..b79d8e43c653d1b2b9c8b981e2c55348ebd69c7e 100644 (file)
@@ -13,6 +13,7 @@
 #include <Main/globals.hxx>
 #include <Main/fg_init.hxx>
 #include <Main/fg_props.hxx>
+#include <Main/renderer.hxx>
 #include <Scenery/tilemgr.hxx>
 #include <Time/light.hxx>
 
@@ -47,7 +48,6 @@ void initMouseQuat(void) {
 
 void reInit(puObject *cb)
 {
-    // BusyCursor(0);
     Quat0();
 
     static const SGPropertyNode *master_freeze
@@ -58,6 +58,7 @@ void reInit(puObject *cb)
         fgSetBool("/sim/freeze/master", true);
     }
 
+    fgSetBool("/sim/signals/reinit", true);
     cur_fdm_state->unbind();
 
     // in case user has changed window size as
@@ -72,6 +73,11 @@ void reInit(puObject *cb)
     // update our position based on current presets
     fgInitPosition();
 
+    // We don't know how to resize the window, so keep the last values 
+    //  for xsize and ysize, and don't use the one set initially
+    fgSetInt("/sim/startup/xsize",xsize);
+    fgSetInt("/sim/startup/ysize",ysize);
+
     SGTime *t = globals->get_time_params();
     delete t;
     t = fgInitTime();
@@ -80,11 +86,9 @@ void reInit(puObject *cb)
     fgReInitSubsystems();
 
     globals->get_tile_mgr()->update( fgGetDouble("/environment/visibility-m") );
+    globals->get_renderer()->resize( xsize, ysize );
+    fgSetBool("/sim/signals/reinit", false);
 
-    fgReshape( xsize, ysize );
-
-    // BusyCursor(1);
-    
     if ( !freeze ) {
         fgSetBool("/sim/freeze/master", false);
     }