summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-27 13:43:55 +0000
committersr55 <[email protected]>2009-06-27 13:43:55 +0000
commit55e1c50521af6d6be32d3a3477ee79b074c6853b (patch)
tree8705a8c82ba028e2d08c2bb31bb52dc45d0a8fcb /win
parentedc5c3c50bbaf09eb2511f217a1228d901d54b55 (diff)
WinGui:
- Fix a few culture issues with my last checkin. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2634 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r--win/C#/Functions/PresetLoader.cs4
-rw-r--r--win/C#/Functions/QueryGenerator.cs4
-rw-r--r--win/C#/frmMain.cs11
3 files changed, 15 insertions, 4 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index b34fff85d..6730b8e49 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -179,7 +179,9 @@ namespace Handbrake.Functions
int.TryParse(val.ToString(), out value);
}
- mainWindow.slider_videoQuality.Value = value;
+ int safevalue;
+ int.TryParse(value.ToString(culture), out safevalue);
+ mainWindow.slider_videoQuality.Value = safevalue;
}
else
{
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index a9a923a47..da44e6076 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -222,7 +222,9 @@ namespace Handbrake.Functions
query += " -q " + value.ToString(new CultureInfo("en-US"));
break;
case "H.264 (x264)":
- double divided = Properties.Settings.Default.x264cqstep;
+ 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 = Math.Round(value, 2);
query += " -q " + value.ToString(new CultureInfo("en-US"));
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 2f2583dcc..0aec0fac2 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -7,6 +7,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
+using System.Globalization;
using System.Windows.Forms;
using System.IO;
using System.Diagnostics;
@@ -1048,7 +1049,11 @@ namespace Handbrake
slider_videoQuality.Minimum = 0;
slider_videoQuality.TickFrequency = 1;
- double multiplier = 1.0 / Properties.Settings.Default.x264cqstep;
+ double divider;
+ CultureInfo culture = CultureInfo.CreateSpecificCulture("en-US");
+ double.TryParse(Properties.Settings.Default.x264cqstep.ToString(culture), out divider);
+
+ double multiplier = 1.0 / divider;
double value = slider_videoQuality.Value*multiplier;
switch (Properties.Settings.Default.x264cqstep.ToString())
@@ -1114,7 +1119,9 @@ namespace Handbrake
SliderValue.Text = Math.Round((val * 100), 2) + "% QP:" + (32 - slider_videoQuality.Value);
break;
case "H.264 (x264)":
- double divided = Properties.Settings.Default.x264cqstep;
+ 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;
min = slider_videoQuality.Minimum;