diff options
Diffstat (limited to 'win/C#/frmMain')
-rw-r--r-- | win/C#/frmMain/PresetLoader.cs | 6 | ||||
-rw-r--r-- | win/C#/frmMain/QueryGenerator.cs | 7 |
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)":
|