summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/PresetLoader.cs
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Functions/PresetLoader.cs')
-rw-r--r--win/C#/Functions/PresetLoader.cs7
1 files changed, 5 insertions, 2 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 136641474..4345f6f9a 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -151,8 +151,10 @@ namespace Handbrake.Functions
mainWindow.radio_cq.Checked = true;
if (presetQuery.VideoEncoder == "H.264 (x264)")
{
+ double cqStep;
+ double.TryParse(Properties.Settings.Default.x264cqstep, out cqStep);
int value;
- double x264step = Properties.Settings.Default.x264cqstep;
+ double x264step = cqStep;
double presetValue = presetQuery.VideoQuality;
double x = 51 / x264step;
@@ -169,7 +171,8 @@ namespace Handbrake.Functions
double val = Math.Round(calculated, 0);
int.TryParse(val.ToString(), out value);
}
- mainWindow.slider_videoQuality.Value = value;
+ if (value < mainWindow.slider_videoQuality.Maximum)
+ mainWindow.slider_videoQuality.Value = value;
}
else
{