summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/C#/Functions/PresetLoader.cs2
-rw-r--r--win/C#/frmMain.cs21
2 files changed, 2 insertions, 21 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index fc835a0ec..e9fd7ba9d 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -5,9 +5,7 @@
namespace Handbrake.Functions
{
- using System;
using System.Drawing;
- using System.Globalization;
using System.Windows.Forms;
/// <summary>
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 5f8cd4ecd..7baa1fcf8 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1434,29 +1434,12 @@ namespace Handbrake
slider_videoQuality.Minimum = 0;
slider_videoQuality.TickFrequency = 1;
- CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
double cqStep = Properties.Settings.Default.x264cqstep;
double multiplier = 1.0 / cqStep;
double value = slider_videoQuality.Value * multiplier;
+
+ slider_videoQuality.Maximum = (int)(51/Properties.Settings.Default.x264cqstep);
- switch (Properties.Settings.Default.x264cqstep.ToString(culture))
- {
- case "0.2":
- slider_videoQuality.Maximum = 255;
- break;
- case "0.25":
- slider_videoQuality.Maximum = 204;
- break;
- case "0.5":
- slider_videoQuality.Maximum = 102;
- break;
- case "1":
- slider_videoQuality.Maximum = 51;
- break;
- default:
- slider_videoQuality.Maximum = 51;
- break;
- }
if (value < slider_videoQuality.Maximum)
slider_videoQuality.Value = slider_videoQuality.Maximum - (int)value;