From 58e776aabee41988c3762e4cab191d8486f0b833 Mon Sep 17 00:00:00 2001 From: dynaflash Date: Tue, 14 Aug 2007 05:15:09 +0000 Subject: [PATCH] MacGui: Add height check for keep aspect ratio on when selecting a preset. - Patch courtesy of BradleyS, Thanks! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@807 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/Controller.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 5f3876260..fc1ce3737 100644 --- a/macosx/Controller.mm +++ b/macosx/Controller.mm @@ -5100,6 +5100,11 @@ the user is using "Custom" settings by determining the sender*/ if (job->keep_ratio == 1) { hb_fix_aspect( job, HB_KEEP_WIDTH ); + if( job->height > fTitle->height ) + { + job->height = fTitle->height; + hb_fix_aspect( job, HB_KEEP_HEIGHT ); + } } job->pixel_ratio = [[chosenPreset objectForKey:@"PicturePAR"] intValue]; } @@ -5111,6 +5116,11 @@ the user is using "Custom" settings by determining the sender*/ if (job->keep_ratio == 1) { hb_fix_aspect( job, HB_KEEP_WIDTH ); + if( job->height > fTitle->height ) + { + job->height = fTitle->height; + hb_fix_aspect( job, HB_KEEP_HEIGHT ); + } } job->pixel_ratio = [[chosenPreset objectForKey:@"PicturePAR"] intValue]; [fPicSettingDeinterlace setStringValue: [NSString stringWithFormat: @"%d",[[chosenPreset objectForKey:@"PictureDeinterlace"] intValue]]]; -- 2.40.0