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
+2 -2
View File
@@ -1112,8 +1112,8 @@ void
MainWin::_GetUnscaledVideoSize(int& videoWidth, int& videoHeight) const MainWin::_GetUnscaledVideoSize(int& videoWidth, int& videoHeight) const
{ {
if (fWidthAspect != 0 && fHeightAspect != 0) { if (fWidthAspect != 0 && fHeightAspect != 0) {
videoWidth = fSourceHeight / fHeightAspect * fWidthAspect; videoWidth = fSourceHeight * fWidthAspect / fHeightAspect;
videoHeight = fSourceWidth / fWidthAspect * fHeightAspect; videoHeight = fSourceWidth * fHeightAspect / fWidthAspect;
// Use the scaling which produces an enlarged view. // Use the scaling which produces an enlarged view.
if (videoWidth > fSourceWidth) { if (videoWidth > fSourceWidth) {
// Enlarge width // Enlarge width