summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/PresetLoader.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-01-17 16:12:04 +0000
committersr55 <[email protected]>2010-01-17 16:12:04 +0000
commit4ce078d06a1c45c562cfd1732ffcbfd60a8e5e5a (patch)
treeb5a543d94c03b81ad647ea2b440c106bd432b86e /win/C#/Functions/PresetLoader.cs
parent21df9865a43a25f48a87da0c02d8b28f12939375 (diff)
WinGui:
- Fix: Correctly set KeepAR for presets with w&h and w only. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3076 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/PresetLoader.cs')
-rw-r--r--win/C#/Functions/PresetLoader.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 5f0459040..65fe8b169 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -95,7 +95,7 @@ namespace Handbrake.Functions
// Set the anamorphic mode 0,1,2,3
mainWindow.PictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;
- // Aspect Ratio
+ // Keep Aspect Ration Anamorphic Setting.
mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;
// Set the Width and height as Required.
@@ -122,6 +122,10 @@ namespace Handbrake.Functions
if (mainWindow.selectedTitle != null && mainWindow.selectedTitle.Resolution.Width != 0)
mainWindow.PictureSettings.text_width.Value = mainWindow.selectedTitle.Resolution.Width;
+ // Aspect Ratio for non anamorphic sources
+ if (presetQuery.AnamorphicMode == 0)
+ mainWindow.PictureSettings.check_KeepAR.CheckState = presetQuery.Height == 0 ? CheckState.Checked : CheckState.Unchecked;
+
// Custom Anamorphic Controls
mainWindow.PictureSettings.updownDisplayWidth.Text = presetQuery.displayWidthValue.ToString();
mainWindow.PictureSettings.updownParHeight.Text = presetQuery.pixelAspectWidth.ToString();
@@ -165,9 +169,9 @@ namespace Handbrake.Functions
double x264step = cqStep;
double presetValue = presetQuery.VideoQuality;
- double x = 51/x264step;
+ double x = 51 / x264step;
- double calculated = presetValue/x264step;
+ double calculated = presetValue / x264step;
calculated = x - calculated;
int.TryParse(calculated.ToString(), out value);
@@ -224,10 +228,7 @@ namespace Handbrake.Functions
newTrack.SubItems.Add(track.Encoder);
newTrack.SubItems.Add(track.MixDown);
newTrack.SubItems.Add(track.SampleRate);
- if (track.Encoder.Contains("AC3"))
- newTrack.SubItems.Add("Auto");
- else
- newTrack.SubItems.Add(track.Bitrate);
+ newTrack.SubItems.Add(track.Encoder.Contains("AC3") ? "Auto" : track.Bitrate);
newTrack.SubItems.Add(track.DRC);
mainWindow.AudioSettings.AddTrackForPreset(newTrack);
}