summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-02-10 20:41:30 +0000
committersr55 <[email protected]>2018-02-10 20:41:30 +0000
commit63f451035ce1a099f4d7d0b8207ea268dcaba483 (patch)
tree3b1c18a20e50353413d3196e0186b6df5d148a83 /win/CS
parent35149c862b00ab2c84b5c6b176a77f0b0c3c3b0b (diff)
WinGui: Fixes to Anamorphic handling on the picture tab and in static preview #1169
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs2
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs15
2 files changed, 6 insertions, 11 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
index 3081faf24..e398edda2 100644
--- a/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
+++ b/win/CS/HandBrake.ApplicationServices/Interop/HandBrakeInstance.cs
@@ -305,7 +305,7 @@ namespace HandBrake.ApplicationServices.Interop
{
height = settings.Height,
width = settings.Width,
- par = settings.Anamorphic != Anamorphic.Custom
+ par = settings.Anamorphic != Anamorphic.Custom && settings.Anamorphic != Anamorphic.Automatic
? new hb_rational_t { den = title.Geometry.PAR.Den, num = title.Geometry.PAR.Num }
: new hb_rational_t { den = settings.PixelAspectY, num = settings.PixelAspectX }
}
diff --git a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
index 828ddfe19..4474938c5 100644
--- a/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/PictureSettingsViewModel.cs
@@ -807,17 +807,11 @@ namespace HandBrakeWPF.ViewModels
{
// Custom
// Set the Width, and Maintain Aspect ratio. That should calc the Height for us.
- this.Task.Width = this.GetModulusValue(this.MaxWidth - this.CropLeft - this.CropRight);
-
+ this.Task.Width = this.GetModulusValue(this.sourceResolution.Width - this.CropLeft - this.CropRight);
+
if (this.SelectedAnamorphicMode != Anamorphic.Loose)
{
- this.Task.Height = this.GetModulusValue(this.MaxHeight - this.CropTop - this.CropBottom);
- }
-
- // If our height is too large, let it downscale the width for us by setting the height to the lower value.
- if (!this.MaintainAspectRatio && this.Height > this.MaxHeight)
- {
- this.Task.Height = this.MaxHeight;
+ this.Task.Height = this.GetModulusValue(this.sourceResolution.Height - this.CropTop - this.CropBottom);
}
}
@@ -829,6 +823,7 @@ namespace HandBrakeWPF.ViewModels
title.ParVal.Width,
title.ParVal.Height);
+ // Force a re-calc. This will handle MaxWidth / Height corrections.
this.RecaulcatePictureSettingsProperties(ChangedPictureField.Width);
}
@@ -912,7 +907,7 @@ namespace HandBrakeWPF.ViewModels
ParH = this.ParHeight,
MaxWidth = this.MaxWidth,
MaxHeight = this.MaxHeight,
- KeepDisplayAspect = this.MaintainAspectRatio,
+ KeepDisplayAspect = false, //this.MaintainAspectRatio,
AnamorphicMode = this.SelectedAnamorphicMode,
Crop = new Cropping(this.CropTop, this.CropBottom, this.CropLeft, this.CropRight),
};