From f1356b840e4999245b69ad57db5ca28c5317c045 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Tue, 14 Feb 2012 22:23:50 +0330 Subject: [PATCH] fbff: fit the screen vertically if needed Fitting the screen horizontally used to cut the lower parts of the video. This patch fits the screen vertically if this happens. Suggested by Sara Fauzia --- fbff.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fbff.c b/fbff.c index 1c32b36..52e6252 100644 --- a/fbff.c +++ b/fbff.c @@ -391,8 +391,11 @@ int main(int argc, char *argv[]) ffs_vinfo(vffs, &w, &h); if (magnify != 1 && sizeof(fbval_t) != FBM_BPP(fb_mode())) fprintf(stderr, "fbff: magnify != 1 and fbval_t doesn't match\n"); - if (fullscreen) - zoom = (float) fb_cols() / w / magnify; + if (fullscreen) { + float hz = (float) fb_rows() / h / magnify; + float wz = (float) fb_cols() / w / magnify; + zoom = hz < wz ? hz : wz; + } ffs_vsetup(vffs, zoom, fb_mode()); } term_setup(); -- 2.11.4.GIT