diff options
Diffstat (limited to 'win/C#/frmMain.cs')
-rw-r--r-- | win/C#/frmMain.cs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index 0aec0fac2..a8418e002 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -1049,14 +1049,11 @@ namespace Handbrake slider_videoQuality.Minimum = 0;
slider_videoQuality.TickFrequency = 1;
- double divider;
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
- double.TryParse(Properties.Settings.Default.x264cqstep.ToString(culture), out divider);
-
- double multiplier = 1.0 / divider;
+ double multiplier = 1.0 / Properties.Settings.Default.x264cqstep;
double value = slider_videoQuality.Value*multiplier;
-
- switch (Properties.Settings.Default.x264cqstep.ToString())
+
+ switch (Properties.Settings.Default.x264cqstep.ToString(culture))
{
case "0.20":
slider_videoQuality.Maximum = 255;
@@ -1119,11 +1116,8 @@ namespace Handbrake SliderValue.Text = Math.Round((val * 100), 2) + "% QP:" + (32 - slider_videoQuality.Value);
break;
case "H.264 (x264)":
- double divided;
- CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
- double.TryParse(Properties.Settings.Default.x264cqstep.ToString(culture), out divided);
- rfValue = 51.0 - slider_videoQuality.Value * divided;
- max = slider_videoQuality.Maximum * divided;
+ rfValue = 51.0 - slider_videoQuality.Value * Properties.Settings.Default.x264cqstep;
+ max = slider_videoQuality.Maximum * Properties.Settings.Default.x264cqstep;
min = slider_videoQuality.Minimum;
val = ((max - min) - (rfValue - min)) / (max - min);
rfValue = Math.Round(rfValue, 2);
@@ -1574,6 +1568,7 @@ namespace Handbrake }
#endregion
+
// This is the END of the road ****************************************
}
}
\ No newline at end of file |