OSDN Git Service

MacGui: Add height check for keep aspect ratio on when selecting a preset.
authordynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 14 Aug 2007 05:15:09 +0000 (05:15 +0000)
committerdynaflash <dynaflash@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 14 Aug 2007 05:15:09 +0000 (05:15 +0000)
- Patch courtesy of BradleyS, Thanks!

git-svn-id: svn://localhost/HandBrake/trunk@807 b64f7644-9d1e-0410-96f1-a4d463321fa5

macosx/Controller.mm

index 5f38762..fc1ce37 100644 (file)
@@ -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]]];