From 0d8ab1c4c18bcad83bdf2e5a325c9cc4a2942571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Fri, 24 Jul 2009 08:09:41 +0000 Subject: [PATCH] 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 --- src/apps/mediaplayer/MainWin.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/apps/mediaplayer/MainWin.cpp b/src/apps/mediaplayer/MainWin.cpp index 895866dd89..f1eaefb767 100644 --- a/src/apps/mediaplayer/MainWin.cpp +++ b/src/apps/mediaplayer/MainWin.cpp @@ -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