1
0
Fork 0

write to /sim/startup/xsize only if the size really changed; likewise for

ysize. This is useful for listeners, e.g. the one that will re-position the
FPS dialog.
This commit is contained in:
mfranz 2006-01-28 10:40:47 +00:00
parent a4bbb31927
commit bae5d4e92b

View file

@ -796,8 +796,13 @@ FGRenderer::resize( int width, int height ) {
glViewport( 0, (GLint)(height - view_h), (GLint)(width), (GLint)(view_h) );
fgSetInt("/sim/startup/xsize", width);
fgSetInt("/sim/startup/ysize", height);
static int lastwidth = width;
static int lastheight = height;
if (width != lastwidth)
fgSetInt("/sim/startup/xsize", lastwidth = width);
if (height != lastheight)
fgSetInt("/sim/startup/ysize", lastheight = height);
guiInitMouse(width, height);
// for all views