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:
parent
a4bbb31927
commit
bae5d4e92b
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue