From: dynaflash Date: Tue, 14 Aug 2007 05:15:09 +0000 (+0000) Subject: MacGui: Add height check for keep aspect ratio on when selecting a preset. X-Git-Url: http://git.osdn.jp/view?a=commitdiff_plain;h=4f40b9a0548b8d3453c6c7d1ce965ef9dae42287;p=handbrake-jp%2Fhandbrake-jp-git.git MacGui: Add height check for keep aspect ratio on when selecting a preset. - Patch courtesy of BradleyS, Thanks! git-svn-id: svn://localhost/HandBrake/trunk@807 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/macosx/Controller.mm b/macosx/Controller.mm index 5f387626..fc1ce373 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]]];