When the display aspect values were large enough, the calculations in

MainWin::_GetUnscaledVideoSize() would result in 0 width/height. Fixes ticket
#4114.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31729 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2009-07-24 08:09:41 +00:00
parent 2bf55b39a5
commit 0d8ab1c4c1
1 changed files with 3 additions and 3 deletions

View File

@ -895,7 +895,7 @@ MainWin::_SetupWindow()
|| previousHeightAspect != fHeightAspect) {
_SetWindowSizeLimits();
if (!fIsFullscreen) {
// Resize to 100% but stay on screen
_ResizeWindow(100, true);
@ -1112,8 +1112,8 @@ void
MainWin::_GetUnscaledVideoSize(int& videoWidth, int& videoHeight) const
{
if (fWidthAspect != 0 && fHeightAspect != 0) {
videoWidth = fSourceHeight / fHeightAspect * fWidthAspect;
videoHeight = fSourceWidth / fWidthAspect * fHeightAspect;
videoWidth = fSourceHeight * fWidthAspect / fHeightAspect;
videoHeight = fSourceWidth * fHeightAspect / fWidthAspect;
// Use the scaling which produces an enlarged view.
if (videoWidth > fSourceWidth) {
// Enlarge width