summaryrefslogtreecommitdiffstats
path: root/win/C#/frmMain
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-02-12 17:49:21 +0000
committersr55 <[email protected]>2009-02-12 17:49:21 +0000
commitfa7bba1748ac6d8c1021c9009d1d183877d4f9a1 (patch)
tree2ffd546eebd288bfd02fc49c0d4c53b0496f18aa /win/C#/frmMain
parentfb40b03f364b822f4e0e5033fa75dea30d734177 (diff)
WinGui:
- Removes 0.33 from x264 granularity slider. - Fixes some rounding issues git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2149 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/frmMain')
-rw-r--r--win/C#/frmMain/PresetLoader.cs6
-rw-r--r--win/C#/frmMain/QueryGenerator.cs7
2 files changed, 10 insertions, 3 deletions
diff --git a/win/C#/frmMain/PresetLoader.cs b/win/C#/frmMain/PresetLoader.cs
index c7b50366e..7064b0c68 100644
--- a/win/C#/frmMain/PresetLoader.cs
+++ b/win/C#/frmMain/PresetLoader.cs
@@ -195,6 +195,12 @@ namespace Handbrake
// when used with .33 and .2 and 1.0 for example.
int.TryParse(calculated.ToString(), out value);
+ if (value == 0)
+ {
+ double val = Math.Round(calculated, 0);
+ int.TryParse(val.ToString(), out value);
+ }
+
mainWindow.slider_videoQuality.Value = value;
}
else
diff --git a/win/C#/frmMain/QueryGenerator.cs b/win/C#/frmMain/QueryGenerator.cs
index 4dabd2433..31ba53e6c 100644
--- a/win/C#/frmMain/QueryGenerator.cs
+++ b/win/C#/frmMain/QueryGenerator.cs
@@ -206,7 +206,7 @@ namespace Handbrake
// Video Quality Setting
if (mainWindow.radio_cq.Checked)
{
- float value;
+ double value;
switch (mainWindow.drp_videoEncoder.Text)
{
case "MPEG-4 (FFmpeg)":
@@ -218,9 +218,10 @@ namespace Handbrake
query += " -q " + value.ToString(new CultureInfo("en-US"));
break;
case "H.264 (x264)":
- float divided;
- float.TryParse(Properties.Settings.Default.x264cqstep, out divided);
+ double divided;
+ double.TryParse(Properties.Settings.Default.x264cqstep, out divided);
value = 51 - mainWindow.slider_videoQuality.Value * divided;
+ value = Math.Round(value, 2);
query += " -q " + value.ToString(new CultureInfo("en-US"));
break;
case "VP3 (Theora)":