Skip to content

Commit

Permalink
TV Playback: Fix vertical fill zoom mode.
Browse files Browse the repository at this point in the history
The overall scale was correct but the offset wasn't working and hence
the video wasn't centered.

Refs #9847
  • Loading branch information
Mark Kendall committed Jun 27, 2011
1 parent 37469a1 commit 8b6eb7c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions mythtv/libs/libmythtv/videooutwindow.cpp
Expand Up @@ -409,9 +409,12 @@ void VideoOutWindow::ApplyLetterboxing(void)
// Video fills screen vertically. May be cropped left and right
float factor = (float)display_visible_rect.height() /
(float)display_video_rect.height();
display_video_rect.moveTop(display_visible_rect.top());
display_video_rect.setHeight(display_video_rect.height() * factor);
display_video_rect.setWidth(display_video_rect.width() * factor);
QSize newsize = QSize((int) (display_video_rect.width() * factor),
(int) (display_video_rect.height() * factor));
QSize temp = (display_video_rect.size() - newsize) / 2;
QPoint newloc = display_video_rect.topLeft() +
QPoint(temp.width(), temp.height());
display_video_rect = QRect(newloc, newsize);
}
else if (adjustfill == kAdjustFill_HorizontalFill &&
display_video_rect.width() > 0)
Expand Down

0 comments on commit 8b6eb7c

Please sign in to comment.