winport - fix bugs in fullscreen viewport sizing
This commit is contained in:
parent
60ea6fe7d5
commit
3308d5b28e
|
@ -640,7 +640,8 @@ void WINCLASS::sizingMsg(WPARAM wParam, LPARAM lParam, LONG keepRatio)
|
|||
|
||||
RECT adjr;
|
||||
SetRect(&adjr,0,0,minWidth,minHeight);
|
||||
MyAdjustWindowRectEx(&adjr,hwnd);
|
||||
if(!(keepRatio & FULLSCREEN))
|
||||
MyAdjustWindowRectEx(&adjr,hwnd);
|
||||
|
||||
RECT frameInfo;
|
||||
SetRect(&frameInfo,0,0,0,0);
|
||||
|
@ -648,6 +649,9 @@ void WINCLASS::sizingMsg(WPARAM wParam, LPARAM lParam, LONG keepRatio)
|
|||
int frameWidth = frameInfo.right-frameInfo.left;
|
||||
int frameHeight = frameInfo.bottom-frameInfo.top + tbheight;
|
||||
|
||||
if((keepRatio & FULLSCREEN))
|
||||
frameWidth = frameHeight = 0;
|
||||
|
||||
// Calculate the minimum size in pixels
|
||||
_minWidth = adjr.right-adjr.left;
|
||||
_minHeight = adjr.bottom-adjr.top + tbheight;
|
||||
|
|
|
@ -4948,9 +4948,14 @@ DOKEYDOWN:
|
|||
int fakeheight = FullScreenRect.bottom-FullScreenRect.top;
|
||||
|
||||
//now use it to create a new virtual area in the center of the client rect
|
||||
int xfudge = (fswidth-fakewidth)/2;
|
||||
int yfudge = (fsheight-fakeheight)/2;
|
||||
OffsetRect(&FullScreenRect,xfudge,yfudge);
|
||||
if(ForceRatio)
|
||||
{
|
||||
int xfudge = (fswidth-fakewidth)/2;
|
||||
int yfudge = (fsheight-fakeheight)/2;
|
||||
OffsetRect(&FullScreenRect,xfudge,yfudge);
|
||||
}
|
||||
else
|
||||
FullScreenRect = fullscreen;
|
||||
}
|
||||
else if(wParam==SIZE_RESTORED)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue