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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user