Fix yet another subtle resize problem I introduced, which upset PUI. This code is terribly fragile - yuck. Thanks to papillion 81 for tracking down the issue,
This commit is contained in:
parent
051fba87d3
commit
a32ef9f391
1 changed files with 8 additions and 3 deletions
|
@ -784,9 +784,14 @@ FGRenderer::resize( int width, int height ) {
|
|||
|
||||
int curWidth = _xsize->getIntValue(),
|
||||
curHeight = _ysize->getIntValue();
|
||||
|
||||
_xsize->setIntValue(width);
|
||||
_ysize->setIntValue(height);
|
||||
if ((curHeight != height) || (curWidth != width)) {
|
||||
// must guard setting these, or PLIB-PUI fails with too many live interfaces
|
||||
_xsize->setIntValue(width);
|
||||
_ysize->setIntValue(height);
|
||||
}
|
||||
|
||||
// must set view aspect ratio each frame, or initial values are wrong.
|
||||
// should probably be fixed 'smarter' during view setup.
|
||||
double aspect = height / (double) width;
|
||||
|
||||
// for all views
|
||||
|
|
Loading…
Add table
Reference in a new issue