From 9bc25d9ce31bd0a38e09258b740787a7195da138 Mon Sep 17 00:00:00 2001 From: curt Date: Mon, 16 Apr 2001 20:31:26 +0000 Subject: [PATCH] Fix for reinit after user resizes screen. --- src/GUI/gui_local.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/GUI/gui_local.cxx b/src/GUI/gui_local.cxx index a68e3063e..9e9bc19ac 100644 --- a/src/GUI/gui_local.cxx +++ b/src/GUI/gui_local.cxx @@ -1,13 +1,16 @@ #include // needed before pu.h #include // plib include - #include
#include
+#include
#include "gui.h" #include "trackball.h" +// from main.cxx +extern void fgReshape(int, int); + // FOR MOUSE VIEW MODE // stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0); static float _quat0[4]; @@ -38,9 +41,19 @@ void reInit(puObject *cb) { BusyCursor(0); Quat0(); + + // in case user has changed window size as + // restoreInitialState() overwrites these + int xsize = fgGetInt("/sim/startup/xsize"); + int ysize = fgGetInt("/sim/startup/ysize"); + build_rotmatrix(GuiQuat_mat, curGuiQuat); /* check */ globals->restoreInitialState(); + fgReInitSubsystems(); + + fgReshape( xsize, ysize ); + BusyCursor(1); } -- 2.39.5