diff options
author | sr55 <[email protected]> | 2014-12-20 14:49:37 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-12-20 14:49:37 +0000 |
commit | 1242ef643baa3d47818774058116cc185985b5da (patch) | |
tree | 14906f805c4c2335f3d0602ea0c25e33d0fa2676 | |
parent | 064322050804f20792408bcd45609276d4ba4240 (diff) |
WinGui: Fix a bug in the anamorphic size code.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6623 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj | 4 | ||||
-rw-r--r-- | win/CS/HandBrakeWPF/Helpers/PictureSize.cs | 17 |
2 files changed, 6 insertions, 15 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj index 2b70bb55a..f722cdabd 100644 --- a/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj +++ b/win/CS/HandBrake.Interop/HandBrakeInterop/HandBrakeInterop.csproj @@ -270,9 +270,7 @@ <Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
- <ItemGroup>
- <Folder Include="SourceData\" />
- </ItemGroup>
+ <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
diff --git a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs index f7dc3aeac..6961ae64f 100644 --- a/win/CS/HandBrakeWPF/Helpers/PictureSize.cs +++ b/win/CS/HandBrakeWPF/Helpers/PictureSize.cs @@ -9,9 +9,7 @@ namespace HandBrakeWPF.Helpers
{
- using System;
using System.Diagnostics;
- using System.Runtime.InteropServices;
using HandBrake.Interop.HbLib;
using HandBrake.Interop.Model;
@@ -177,11 +175,6 @@ namespace HandBrakeWPF.Helpers /// </returns>
public static AnamorphicResult hb_set_anamorphic_size2(PictureSettingsJob job, PictureSettingsTitle title, KeepSetting setting)
{
- int outputHeight = 0;
- int outputParHeight = 0;
- int outputParWidth = 0;
- int outputWidth = 0;
-
int settingMode = (int)setting + (job.KeepDisplayAspect ? 0x04 : 0);
hb_geometry_settings_s uiGeometry = new hb_geometry_settings_s
@@ -193,7 +186,7 @@ namespace HandBrakeWPF.Helpers maxHeight = job.MaxHeight,
mode = (int)(hb_anamorphic_mode_t)job.AnamorphicMode,
modulus = job.Modulus.HasValue ? job.Modulus.Value : 16,
- geometry = new hb_geometry_s() { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}
+ geometry = new hb_geometry_s { height = job.Height, width = job.Width, par = job.AnamorphicMode != Anamorphic.Custom ? new hb_rational_t { den = title.ParH, num = title.ParW } : new hb_rational_t { den = job.ParH, num = job.ParW }}
};
hb_geometry_s sourceGeometry = new hb_geometry_s
@@ -207,10 +200,10 @@ namespace HandBrakeWPF.Helpers HBFunctions.hb_set_anamorphic_size2(ref sourceGeometry, ref uiGeometry, ref result);
- outputWidth = result.width;
- outputHeight = result.height;
- outputParWidth = result.par.den;
- outputParHeight = result.par.num;
+ int outputWidth = result.width;
+ int outputHeight = result.height;
+ int outputParWidth = result.par.num;
+ int outputParHeight = result.par.den;
Debug.WriteLine("hb_set_anamorphic_size2: {0}x{1}", outputWidth, outputHeight);
return new AnamorphicResult { OutputWidth = outputWidth, OutputHeight = outputHeight, OutputParWidth = outputParWidth, OutputParHeight = outputParHeight };
}
|