summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/PresetLoader.cs7
-rw-r--r--win/C#/Functions/QueryGenerator.cs6
2 files changed, 3 insertions, 10 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 6730b8e49..82d96e660 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -159,8 +159,6 @@ namespace Handbrake.Functions
if (presetQuery.VideoEncoder == "H.264 (x264)")
{
int value;
- System.Globalization.CultureInfo culture = System.Globalization.CultureInfo.CreateSpecificCulture("en-US");
-
double x264step = Properties.Settings.Default.x264cqstep;
double presetValue = presetQuery.VideoQuality;
@@ -178,10 +176,7 @@ namespace Handbrake.Functions
double val = Math.Round(calculated, 0);
int.TryParse(val.ToString(), out value);
}
-
- int safevalue;
- int.TryParse(value.ToString(culture), out safevalue);
- mainWindow.slider_videoQuality.Value = safevalue;
+ mainWindow.slider_videoQuality.Value = value;
}
else
{
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index da44e6076..85e76f57b 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -222,12 +222,10 @@ namespace Handbrake.Functions
query += " -q " + value.ToString(new CultureInfo("en-US"));
break;
case "H.264 (x264)":
- double divided;
CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
- double.TryParse(Properties.Settings.Default.x264cqstep.ToString(culture), out divided);
- value = 51 - mainWindow.slider_videoQuality.Value * divided;
+ value = 51 - mainWindow.slider_videoQuality.Value * Properties.Settings.Default.x264cqstep;
value = Math.Round(value, 2);
- query += " -q " + value.ToString(new CultureInfo("en-US"));
+ query += " -q " + value.ToString(culture);
break;
case "VP3 (Theora)":
value = mainWindow.slider_videoQuality.Value;